/* /web/static/lib/luxon/luxon.js defined in bundle 'web.assets_frontend_lazy' */ var luxon=(function(exports){'use strict';function _defineProperties(target,props){for(var i=0;i=0)continue;target[key]=source[key];} return target;} function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);} function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i=o.length)return{done:true};return{done:false,value:o[i++]};};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");} i=o[Symbol.iterator]();return i.next.bind(i);} var LuxonError=function(_Error){_inheritsLoose(LuxonError,_Error);function LuxonError(){return _Error.apply(this,arguments)||this;} return LuxonError;}(_wrapNativeSuper(Error));var InvalidDateTimeError=function(_LuxonError){_inheritsLoose(InvalidDateTimeError,_LuxonError);function InvalidDateTimeError(reason){return _LuxonError.call(this,"Invalid DateTime: "+reason.toMessage())||this;} return InvalidDateTimeError;}(LuxonError);var InvalidIntervalError=function(_LuxonError2){_inheritsLoose(InvalidIntervalError,_LuxonError2);function InvalidIntervalError(reason){return _LuxonError2.call(this,"Invalid Interval: "+reason.toMessage())||this;} return InvalidIntervalError;}(LuxonError);var InvalidDurationError=function(_LuxonError3){_inheritsLoose(InvalidDurationError,_LuxonError3);function InvalidDurationError(reason){return _LuxonError3.call(this,"Invalid Duration: "+reason.toMessage())||this;} return InvalidDurationError;}(LuxonError);var ConflictingSpecificationError=function(_LuxonError4){_inheritsLoose(ConflictingSpecificationError,_LuxonError4);function ConflictingSpecificationError(){return _LuxonError4.apply(this,arguments)||this;} return ConflictingSpecificationError;}(LuxonError);var InvalidUnitError=function(_LuxonError5){_inheritsLoose(InvalidUnitError,_LuxonError5);function InvalidUnitError(unit){return _LuxonError5.call(this,"Invalid unit "+unit)||this;} return InvalidUnitError;}(LuxonError);var InvalidArgumentError=function(_LuxonError6){_inheritsLoose(InvalidArgumentError,_LuxonError6);function InvalidArgumentError(){return _LuxonError6.apply(this,arguments)||this;} return InvalidArgumentError;}(LuxonError);var ZoneIsAbstractError=function(_LuxonError7){_inheritsLoose(ZoneIsAbstractError,_LuxonError7);function ZoneIsAbstractError(){return _LuxonError7.call(this,"Zone is an abstract class")||this;} return ZoneIsAbstractError;}(LuxonError);var n="numeric",s="short",l="long";var DATE_SHORT={year:n,month:n,day:n};var DATE_MED={year:n,month:s,day:n};var DATE_MED_WITH_WEEKDAY={year:n,month:s,day:n,weekday:s};var DATE_FULL={year:n,month:l,day:n};var DATE_HUGE={year:n,month:l,day:n,weekday:l};var TIME_SIMPLE={hour:n,minute:n};var TIME_WITH_SECONDS={hour:n,minute:n,second:n};var TIME_WITH_SHORT_OFFSET={hour:n,minute:n,second:n,timeZoneName:s};var TIME_WITH_LONG_OFFSET={hour:n,minute:n,second:n,timeZoneName:l};var TIME_24_SIMPLE={hour:n,minute:n,hour12:false};var TIME_24_WITH_SECONDS={hour:n,minute:n,second:n,hour12:false};var TIME_24_WITH_SHORT_OFFSET={hour:n,minute:n,second:n,hour12:false,timeZoneName:s};var TIME_24_WITH_LONG_OFFSET={hour:n,minute:n,second:n,hour12:false,timeZoneName:l};var DATETIME_SHORT={year:n,month:n,day:n,hour:n,minute:n};var DATETIME_SHORT_WITH_SECONDS={year:n,month:n,day:n,hour:n,minute:n,second:n};var DATETIME_MED={year:n,month:s,day:n,hour:n,minute:n};var DATETIME_MED_WITH_SECONDS={year:n,month:s,day:n,hour:n,minute:n,second:n};var DATETIME_MED_WITH_WEEKDAY={year:n,month:s,day:n,weekday:s,hour:n,minute:n};var DATETIME_FULL={year:n,month:l,day:n,hour:n,minute:n,timeZoneName:s};var DATETIME_FULL_WITH_SECONDS={year:n,month:l,day:n,hour:n,minute:n,second:n,timeZoneName:s};var DATETIME_HUGE={year:n,month:l,day:n,weekday:l,hour:n,minute:n,timeZoneName:l};var DATETIME_HUGE_WITH_SECONDS={year:n,month:l,day:n,weekday:l,hour:n,minute:n,second:n,timeZoneName:l};function isUndefined(o){return typeof o==="undefined";} function isNumber(o){return typeof o==="number";} function isInteger(o){return typeof o==="number"&&o%1===0;} function isString(o){return typeof o==="string";} function isDate(o){return Object.prototype.toString.call(o)==="[object Date]";} function hasIntl(){try{return typeof Intl!=="undefined"&&Intl.DateTimeFormat;}catch(e){return false;}} function hasFormatToParts(){return!isUndefined(Intl.DateTimeFormat.prototype.formatToParts);} function hasRelative(){try{return typeof Intl!=="undefined"&&!!Intl.RelativeTimeFormat;}catch(e){return false;}} function maybeArray(thing){return Array.isArray(thing)?thing:[thing];} function bestBy(arr,by,compare){if(arr.length===0){return undefined;} return arr.reduce(function(best,next){var pair=[by(next),next];if(!best){return pair;}else if(compare(best[0],pair[0])===best[0]){return best;}else{return pair;}},null)[1];} function pick(obj,keys){return keys.reduce(function(a,k){a[k]=obj[k];return a;},{});} function hasOwnProperty(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop);} function integerBetween(thing,bottom,top){return isInteger(thing)&&thing>=bottom&&thing<=top;} function floorMod(x,n){return x-n*Math.floor(x/n);} function padStart(input,n){if(n===void 0){n=2;} if(input.toString().length=0){d=new Date(d);d.setUTCFullYear(d.getUTCFullYear()-1900);} return+d;} function weeksInWeekYear(weekYear){var p1=(weekYear+Math.floor(weekYear/4)-Math.floor(weekYear/100)+Math.floor(weekYear/400))%7,last=weekYear-1,p2=(last+Math.floor(last/4)-Math.floor(last/100)+Math.floor(last/400))%7;return p1===4||p2===3?53:52;} function untruncateYear(year){if(year>99){return year;}else return year>60?1900+year:2000+year;} function parseZoneInfo(ts,offsetFormat,locale,timeZone){if(timeZone===void 0){timeZone=null;} var date=new Date(ts),intlOpts={hour12:false,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};if(timeZone){intlOpts.timeZone=timeZone;} var modified=Object.assign({timeZoneName:offsetFormat},intlOpts),intl=hasIntl();if(intl&&hasFormatToParts()){var parsed=new Intl.DateTimeFormat(locale,modified).formatToParts(date).find(function(m){return m.type.toLowerCase()==="timezonename";});return parsed?parsed.value:null;}else if(intl){var without=new Intl.DateTimeFormat(locale,intlOpts).format(date),included=new Intl.DateTimeFormat(locale,modified).format(date),diffed=included.substring(without.length),trimmed=diffed.replace(/^[, \u200e]+/,"");return trimmed;}else{return null;}} function signedOffset(offHourStr,offMinuteStr){var offHour=parseInt(offHourStr,10);if(Number.isNaN(offHour)){offHour=0;} var offMin=parseInt(offMinuteStr,10)||0,offMinSigned=offHour<0||Object.is(offHour,-0)?-offMin:offMin;return offHour*60+offMinSigned;} function asNumber(value){var numericValue=Number(value);if(typeof value==="boolean"||value===""||Number.isNaN(numericValue))throw new InvalidArgumentError("Invalid unit value "+value);return numericValue;} function normalizeObject(obj,normalizer,nonUnitKeys){var normalized={};for(var u in obj){if(hasOwnProperty(obj,u)){if(nonUnitKeys.indexOf(u)>=0)continue;var v=obj[u];if(v===undefined||v===null)continue;normalized[normalizer(u)]=asNumber(v);}} return normalized;} function formatOffset(offset,format){var hours=Math.trunc(Math.abs(offset/60)),minutes=Math.trunc(Math.abs(offset%60)),sign=offset>=0?"+":"-";switch(format){case"short":return""+sign+padStart(hours,2)+":"+padStart(minutes,2);case"narrow":return""+sign+hours+(minutes>0?":"+minutes:"");case"techie":return""+sign+padStart(hours,2)+padStart(minutes,2);default:throw new RangeError("Value format "+format+" is out of range for property format");}} function timeObject(obj){return pick(obj,["hour","minute","second","millisecond"]);} var ianaRegex=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;function stringify(obj){return JSON.stringify(obj,Object.keys(obj).sort());} var monthsLong=["January","February","March","April","May","June","July","August","September","October","November","December"];var monthsShort=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];var monthsNarrow=["J","F","M","A","M","J","J","A","S","O","N","D"];function months(length){switch(length){case"narrow":return monthsNarrow;case"short":return monthsShort;case"long":return monthsLong;case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null;}} var weekdaysLong=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"];var weekdaysShort=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"];var weekdaysNarrow=["M","T","W","T","F","S","S"];function weekdays(length){switch(length){case"narrow":return weekdaysNarrow;case"short":return weekdaysShort;case"long":return weekdaysLong;case"numeric":return["1","2","3","4","5","6","7"];default:return null;}} var meridiems=["AM","PM"];var erasLong=["Before Christ","Anno Domini"];var erasShort=["BC","AD"];var erasNarrow=["B","A"];function eras(length){switch(length){case"narrow":return erasNarrow;case"short":return erasShort;case"long":return erasLong;default:return null;}} function meridiemForDateTime(dt){return meridiems[dt.hour<12?0:1];} function weekdayForDateTime(dt,length){return weekdays(length)[dt.weekday-1];} function monthForDateTime(dt,length){return months(length)[dt.month-1];} function eraForDateTime(dt,length){return eras(length)[dt.year<0?0:1];} function formatRelativeTime(unit,count,numeric,narrow){if(numeric===void 0){numeric="always";} if(narrow===void 0){narrow=false;} var units={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]};var lastable=["hours","minutes","seconds"].indexOf(unit)===-1;if(numeric==="auto"&&lastable){var isDay=unit==="days";switch(count){case 1:return isDay?"tomorrow":"next "+units[unit][0];case-1:return isDay?"yesterday":"last "+units[unit][0];case 0:return isDay?"today":"this "+units[unit][0];}} var isInPast=Object.is(count,-0)||count<0,fmtValue=Math.abs(count),singular=fmtValue===1,lilUnits=units[unit],fmtUnit=narrow?singular?lilUnits[1]:lilUnits[2]||lilUnits[1]:singular?units[unit][0]:unit;return isInPast?fmtValue+" "+fmtUnit+" ago":"in "+fmtValue+" "+fmtUnit;} function formatString(knownFormat){var filtered=pick(knownFormat,["weekday","era","year","month","day","hour","minute","second","timeZoneName","hour12"]),key=stringify(filtered),dateTimeHuge="EEEE, LLLL d, yyyy, h:mm a";switch(key){case stringify(DATE_SHORT):return"M/d/yyyy";case stringify(DATE_MED):return"LLL d, yyyy";case stringify(DATE_MED_WITH_WEEKDAY):return"EEE, LLL d, yyyy";case stringify(DATE_FULL):return"LLLL d, yyyy";case stringify(DATE_HUGE):return"EEEE, LLLL d, yyyy";case stringify(TIME_SIMPLE):return"h:mm a";case stringify(TIME_WITH_SECONDS):return"h:mm:ss a";case stringify(TIME_WITH_SHORT_OFFSET):return"h:mm a";case stringify(TIME_WITH_LONG_OFFSET):return"h:mm a";case stringify(TIME_24_SIMPLE):return"HH:mm";case stringify(TIME_24_WITH_SECONDS):return"HH:mm:ss";case stringify(TIME_24_WITH_SHORT_OFFSET):return"HH:mm";case stringify(TIME_24_WITH_LONG_OFFSET):return"HH:mm";case stringify(DATETIME_SHORT):return"M/d/yyyy, h:mm a";case stringify(DATETIME_MED):return"LLL d, yyyy, h:mm a";case stringify(DATETIME_FULL):return"LLLL d, yyyy, h:mm a";case stringify(DATETIME_HUGE):return dateTimeHuge;case stringify(DATETIME_SHORT_WITH_SECONDS):return"M/d/yyyy, h:mm:ss a";case stringify(DATETIME_MED_WITH_SECONDS):return"LLL d, yyyy, h:mm:ss a";case stringify(DATETIME_MED_WITH_WEEKDAY):return"EEE, d LLL yyyy, h:mm a";case stringify(DATETIME_FULL_WITH_SECONDS):return"LLLL d, yyyy, h:mm:ss a";case stringify(DATETIME_HUGE_WITH_SECONDS):return"EEEE, LLLL d, yyyy, h:mm:ss a";default:return dateTimeHuge;}} function stringifyTokens(splits,tokenToString){var s="";for(var _iterator=_createForOfIteratorHelperLoose(splits),_step;!(_step=_iterator()).done;){var token=_step.value;if(token.literal){s+=token.val;}else{s+=tokenToString(token.val);}} return s;} var _macroTokenToFormatOpts={D:DATE_SHORT,DD:DATE_MED,DDD:DATE_FULL,DDDD:DATE_HUGE,t:TIME_SIMPLE,tt:TIME_WITH_SECONDS,ttt:TIME_WITH_SHORT_OFFSET,tttt:TIME_WITH_LONG_OFFSET,T:TIME_24_SIMPLE,TT:TIME_24_WITH_SECONDS,TTT:TIME_24_WITH_SHORT_OFFSET,TTTT:TIME_24_WITH_LONG_OFFSET,f:DATETIME_SHORT,ff:DATETIME_MED,fff:DATETIME_FULL,ffff:DATETIME_HUGE,F:DATETIME_SHORT_WITH_SECONDS,FF:DATETIME_MED_WITH_SECONDS,FFF:DATETIME_FULL_WITH_SECONDS,FFFF:DATETIME_HUGE_WITH_SECONDS};var Formatter=function(){Formatter.create=function create(locale,opts){if(opts===void 0){opts={};} return new Formatter(locale,opts);};Formatter.parseFormat=function parseFormat(fmt){var current=null,currentFull="",bracketed=false;var splits=[];for(var i=0;i0){splits.push({literal:bracketed,val:currentFull});} current=null;currentFull="";bracketed=!bracketed;}else if(bracketed){currentFull+=c;}else if(c===current){currentFull+=c;}else{if(currentFull.length>0){splits.push({literal:false,val:currentFull});} currentFull=c;current=c;}} if(currentFull.length>0){splits.push({literal:bracketed,val:currentFull});} return splits;};Formatter.macroTokenToFormatOpts=function macroTokenToFormatOpts(token){return _macroTokenToFormatOpts[token];};function Formatter(locale,formatOpts){this.opts=formatOpts;this.loc=locale;this.systemLoc=null;} var _proto=Formatter.prototype;_proto.formatWithSystemDefault=function formatWithSystemDefault(dt,opts){if(this.systemLoc===null){this.systemLoc=this.loc.redefaultToSystem();} var df=this.systemLoc.dtFormatter(dt,Object.assign({},this.opts,opts));return df.format();};_proto.formatDateTime=function formatDateTime(dt,opts){if(opts===void 0){opts={};} var df=this.loc.dtFormatter(dt,Object.assign({},this.opts,opts));return df.format();};_proto.formatDateTimeParts=function formatDateTimeParts(dt,opts){if(opts===void 0){opts={};} var df=this.loc.dtFormatter(dt,Object.assign({},this.opts,opts));return df.formatToParts();};_proto.resolvedOptions=function resolvedOptions(dt,opts){if(opts===void 0){opts={};} var df=this.loc.dtFormatter(dt,Object.assign({},this.opts,opts));return df.resolvedOptions();};_proto.num=function num(n,p){if(p===void 0){p=0;} if(this.opts.forceSimple){return padStart(n,p);} var opts=Object.assign({},this.opts);if(p>0){opts.padTo=p;} return this.loc.numberFormatter(opts).format(n);};_proto.formatDateTimeFromString=function formatDateTimeFromString(dt,fmt){var _this=this;var knownEnglish=this.loc.listingMode()==="en",useDateTimeFormatter=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory"&&hasFormatToParts(),string=function string(opts,extract){return _this.loc.extract(dt,opts,extract);},formatOffset=function formatOffset(opts){if(dt.isOffsetFixed&&dt.offset===0&&opts.allowZ){return"Z";} return dt.isValid?dt.zone.formatOffset(dt.ts,opts.format):"";},meridiem=function meridiem(){return knownEnglish?meridiemForDateTime(dt):string({hour:"numeric",hour12:true},"dayperiod");},month=function month(length,standalone){return knownEnglish?monthForDateTime(dt,length):string(standalone?{month:length}:{month:length,day:"numeric"},"month");},weekday=function weekday(length,standalone){return knownEnglish?weekdayForDateTime(dt,length):string(standalone?{weekday:length}:{weekday:length,month:"long",day:"numeric"},"weekday");},maybeMacro=function maybeMacro(token){var formatOpts=Formatter.macroTokenToFormatOpts(token);if(formatOpts){return _this.formatWithSystemDefault(dt,formatOpts);}else{return token;}},era=function era(length){return knownEnglish?eraForDateTime(dt,length):string({era:length},"era");},tokenToString=function tokenToString(token){switch(token){case"S":return _this.num(dt.millisecond);case"u":case"SSS":return _this.num(dt.millisecond,3);case"s":return _this.num(dt.second);case"ss":return _this.num(dt.second,2);case"m":return _this.num(dt.minute);case"mm":return _this.num(dt.minute,2);case"h":return _this.num(dt.hour%12===0?12:dt.hour%12);case"hh":return _this.num(dt.hour%12===0?12:dt.hour%12,2);case"H":return _this.num(dt.hour);case"HH":return _this.num(dt.hour,2);case"Z":return formatOffset({format:"narrow",allowZ:_this.opts.allowZ});case"ZZ":return formatOffset({format:"short",allowZ:_this.opts.allowZ});case"ZZZ":return formatOffset({format:"techie",allowZ:_this.opts.allowZ});case"ZZZZ":return dt.zone.offsetName(dt.ts,{format:"short",locale:_this.loc.locale});case"ZZZZZ":return dt.zone.offsetName(dt.ts,{format:"long",locale:_this.loc.locale});case"z":return dt.zoneName;case"a":return meridiem();case"d":return useDateTimeFormatter?string({day:"numeric"},"day"):_this.num(dt.day);case"dd":return useDateTimeFormatter?string({day:"2-digit"},"day"):_this.num(dt.day,2);case"c":return _this.num(dt.weekday);case"ccc":return weekday("short",true);case"cccc":return weekday("long",true);case"ccccc":return weekday("narrow",true);case"E":return _this.num(dt.weekday);case"EEE":return weekday("short",false);case"EEEE":return weekday("long",false);case"EEEEE":return weekday("narrow",false);case"L":return useDateTimeFormatter?string({month:"numeric",day:"numeric"},"month"):_this.num(dt.month);case"LL":return useDateTimeFormatter?string({month:"2-digit",day:"numeric"},"month"):_this.num(dt.month,2);case"LLL":return month("short",true);case"LLLL":return month("long",true);case"LLLLL":return month("narrow",true);case"M":return useDateTimeFormatter?string({month:"numeric"},"month"):_this.num(dt.month);case"MM":return useDateTimeFormatter?string({month:"2-digit"},"month"):_this.num(dt.month,2);case"MMM":return month("short",false);case"MMMM":return month("long",false);case"MMMMM":return month("narrow",false);case"y":return useDateTimeFormatter?string({year:"numeric"},"year"):_this.num(dt.year);case"yy":return useDateTimeFormatter?string({year:"2-digit"},"year"):_this.num(dt.year.toString().slice(-2),2);case"yyyy":return useDateTimeFormatter?string({year:"numeric"},"year"):_this.num(dt.year,4);case"yyyyyy":return useDateTimeFormatter?string({year:"numeric"},"year"):_this.num(dt.year,6);case"G":return era("short");case"GG":return era("long");case"GGGGG":return era("narrow");case"kk":return _this.num(dt.weekYear.toString().slice(-2),2);case"kkkk":return _this.num(dt.weekYear,4);case"W":return _this.num(dt.weekNumber);case"WW":return _this.num(dt.weekNumber,2);case"o":return _this.num(dt.ordinal);case"ooo":return _this.num(dt.ordinal,3);case"q":return _this.num(dt.quarter);case"qq":return _this.num(dt.quarter,2);case"X":return _this.num(Math.floor(dt.ts/1000));case"x":return _this.num(dt.ts);default:return maybeMacro(token);}};return stringifyTokens(Formatter.parseFormat(fmt),tokenToString);};_proto.formatDurationFromString=function formatDurationFromString(dur,fmt){var _this2=this;var tokenToField=function tokenToField(token){switch(token[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null;}},tokenToString=function tokenToString(lildur){return function(token){var mapped=tokenToField(token);if(mapped){return _this2.num(lildur.get(mapped),token.length);}else{return token;}};},tokens=Formatter.parseFormat(fmt),realTokens=tokens.reduce(function(found,_ref){var literal=_ref.literal,val=_ref.val;return literal?found:found.concat(val);},[]),collapsed=dur.shiftTo.apply(dur,realTokens.map(tokenToField).filter(function(t){return t;}));return stringifyTokens(tokens,tokenToString(collapsed));};return Formatter;}();var Invalid=function(){function Invalid(reason,explanation){this.reason=reason;this.explanation=explanation;} var _proto=Invalid.prototype;_proto.toMessage=function toMessage(){if(this.explanation){return this.reason+": "+this.explanation;}else{return this.reason;}};return Invalid;}();var Zone=function(){function Zone(){} var _proto=Zone.prototype;_proto.offsetName=function offsetName(ts,opts){throw new ZoneIsAbstractError();};_proto.formatOffset=function formatOffset(ts,format){throw new ZoneIsAbstractError();};_proto.offset=function offset(ts){throw new ZoneIsAbstractError();};_proto.equals=function equals(otherZone){throw new ZoneIsAbstractError();};_createClass(Zone,[{key:"type",get:function get(){throw new ZoneIsAbstractError();}},{key:"name",get:function get(){throw new ZoneIsAbstractError();}},{key:"universal",get:function get(){throw new ZoneIsAbstractError();}},{key:"isValid",get:function get(){throw new ZoneIsAbstractError();}}]);return Zone;}();var singleton=null;var LocalZone=function(_Zone){_inheritsLoose(LocalZone,_Zone);function LocalZone(){return _Zone.apply(this,arguments)||this;} var _proto=LocalZone.prototype;_proto.offsetName=function offsetName(ts,_ref){var format=_ref.format,locale=_ref.locale;return parseZoneInfo(ts,format,locale);};_proto.formatOffset=function formatOffset$1(ts,format){return formatOffset(this.offset(ts),format);};_proto.offset=function offset(ts){return-new Date(ts).getTimezoneOffset();};_proto.equals=function equals(otherZone){return otherZone.type==="local";};_createClass(LocalZone,[{key:"type",get:function get(){return"local";}},{key:"name",get:function get(){if(hasIntl()){return new Intl.DateTimeFormat().resolvedOptions().timeZone;}else return"local";}},{key:"universal",get:function get(){return false;}},{key:"isValid",get:function get(){return true;}}],[{key:"instance",get:function get(){if(singleton===null){singleton=new LocalZone();} return singleton;}}]);return LocalZone;}(Zone);var matchingRegex=RegExp("^"+ianaRegex.source+"$");var dtfCache={};function makeDTF(zone){if(!dtfCache[zone]){dtfCache[zone]=new Intl.DateTimeFormat("en-US",{hour12:false,timeZone:zone,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"});} return dtfCache[zone];} var typeToPos={year:0,month:1,day:2,hour:3,minute:4,second:5};function hackyOffset(dtf,date){var formatted=dtf.format(date).replace(/\u200E/g,""),parsed=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(formatted),fMonth=parsed[1],fDay=parsed[2],fYear=parsed[3],fHour=parsed[4],fMinute=parsed[5],fSecond=parsed[6];return[fYear,fMonth,fDay,fHour,fMinute,fSecond];} function partsOffset(dtf,date){var formatted=dtf.formatToParts(date),filled=[];for(var i=0;i=0?over:1000+over;return(asUTC-asTS)/(60*1000);};_proto.equals=function equals(otherZone){return otherZone.type==="iana"&&otherZone.name===this.name;};_createClass(IANAZone,[{key:"type",get:function get(){return"iana";}},{key:"name",get:function get(){return this.zoneName;}},{key:"universal",get:function get(){return false;}},{key:"isValid",get:function get(){return this.valid;}}]);return IANAZone;}(Zone);var singleton$1=null;var FixedOffsetZone=function(_Zone){_inheritsLoose(FixedOffsetZone,_Zone);FixedOffsetZone.instance=function instance(offset){return offset===0?FixedOffsetZone.utcInstance:new FixedOffsetZone(offset);};FixedOffsetZone.parseSpecifier=function parseSpecifier(s){if(s){var r=s.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(r){return new FixedOffsetZone(signedOffset(r[1],r[2]));}} return null;};_createClass(FixedOffsetZone,null,[{key:"utcInstance",get:function get(){if(singleton$1===null){singleton$1=new FixedOffsetZone(0);} return singleton$1;}}]);function FixedOffsetZone(offset){var _this;_this=_Zone.call(this)||this;_this.fixed=offset;return _this;} var _proto=FixedOffsetZone.prototype;_proto.offsetName=function offsetName(){return this.name;};_proto.formatOffset=function formatOffset$1(ts,format){return formatOffset(this.fixed,format);};_proto.offset=function offset(){return this.fixed;};_proto.equals=function equals(otherZone){return otherZone.type==="fixed"&&otherZone.fixed===this.fixed;};_createClass(FixedOffsetZone,[{key:"type",get:function get(){return"fixed";}},{key:"name",get:function get(){return this.fixed===0?"UTC":"UTC"+formatOffset(this.fixed,"narrow");}},{key:"universal",get:function get(){return true;}},{key:"isValid",get:function get(){return true;}}]);return FixedOffsetZone;}(Zone);var InvalidZone=function(_Zone){_inheritsLoose(InvalidZone,_Zone);function InvalidZone(zoneName){var _this;_this=_Zone.call(this)||this;_this.zoneName=zoneName;return _this;} var _proto=InvalidZone.prototype;_proto.offsetName=function offsetName(){return null;};_proto.formatOffset=function formatOffset(){return"";};_proto.offset=function offset(){return NaN;};_proto.equals=function equals(){return false;};_createClass(InvalidZone,[{key:"type",get:function get(){return"invalid";}},{key:"name",get:function get(){return this.zoneName;}},{key:"universal",get:function get(){return false;}},{key:"isValid",get:function get(){return false;}}]);return InvalidZone;}(Zone);function normalizeZone(input,defaultZone){var offset;if(isUndefined(input)||input===null){return defaultZone;}else if(input instanceof Zone){return input;}else if(isString(input)){var lowered=input.toLowerCase();if(lowered==="local")return defaultZone;else if(lowered==="utc"||lowered==="gmt")return FixedOffsetZone.utcInstance;else if((offset=IANAZone.parseGMTOffset(input))!=null){return FixedOffsetZone.instance(offset);}else if(IANAZone.isValidSpecifier(lowered))return IANAZone.create(input);else return FixedOffsetZone.parseSpecifier(lowered)||new InvalidZone(input);}else if(isNumber(input)){return FixedOffsetZone.instance(input);}else if(typeof input==="object"&&input.offset&&typeof input.offset==="number"){return input;}else{return new InvalidZone(input);}} var now=function now(){return Date.now();},defaultZone=null,defaultLocale=null,defaultNumberingSystem=null,defaultOutputCalendar=null,throwOnInvalid=false;var Settings=function(){function Settings(){} Settings.resetCaches=function resetCaches(){Locale.resetCache();IANAZone.resetCache();};_createClass(Settings,null,[{key:"now",get:function get(){return now;},set:function set(n){now=n;}},{key:"defaultZoneName",get:function get(){return Settings.defaultZone.name;},set:function set(z){if(!z){defaultZone=null;}else{defaultZone=normalizeZone(z);}}},{key:"defaultZone",get:function get(){return defaultZone||LocalZone.instance;}},{key:"defaultLocale",get:function get(){return defaultLocale;},set:function set(locale){defaultLocale=locale;}},{key:"defaultNumberingSystem",get:function get(){return defaultNumberingSystem;},set:function set(numberingSystem){defaultNumberingSystem=numberingSystem;}},{key:"defaultOutputCalendar",get:function get(){return defaultOutputCalendar;},set:function set(outputCalendar){defaultOutputCalendar=outputCalendar;}},{key:"throwOnInvalid",get:function get(){return throwOnInvalid;},set:function set(t){throwOnInvalid=t;}}]);return Settings;}();var intlDTCache={};function getCachedDTF(locString,opts){if(opts===void 0){opts={};} var key=JSON.stringify([locString,opts]);var dtf=intlDTCache[key];if(!dtf){dtf=new Intl.DateTimeFormat(locString,opts);intlDTCache[key]=dtf;} return dtf;} var intlNumCache={};function getCachedINF(locString,opts){if(opts===void 0){opts={};} var key=JSON.stringify([locString,opts]);var inf=intlNumCache[key];if(!inf){inf=new Intl.NumberFormat(locString,opts);intlNumCache[key]=inf;} return inf;} var intlRelCache={};function getCachedRTF(locString,opts){if(opts===void 0){opts={};} var _opts=opts,base=_opts.base,cacheKeyOpts=_objectWithoutPropertiesLoose(_opts,["base"]);var key=JSON.stringify([locString,cacheKeyOpts]);var inf=intlRelCache[key];if(!inf){inf=new Intl.RelativeTimeFormat(locString,opts);intlRelCache[key]=inf;} return inf;} var sysLocaleCache=null;function systemLocale(){if(sysLocaleCache){return sysLocaleCache;}else if(hasIntl()){var computedSys=new Intl.DateTimeFormat().resolvedOptions().locale;sysLocaleCache=!computedSys||computedSys==="und"?"en-US":computedSys;return sysLocaleCache;}else{sysLocaleCache="en-US";return sysLocaleCache;}} function parseLocaleString(localeStr){var uIndex=localeStr.indexOf("-u-");if(uIndex===-1){return[localeStr];}else{var options;var smaller=localeStr.substring(0,uIndex);try{options=getCachedDTF(localeStr).resolvedOptions();}catch(e){options=getCachedDTF(smaller).resolvedOptions();} var _options=options,numberingSystem=_options.numberingSystem,calendar=_options.calendar;return[smaller,numberingSystem,calendar];}} function intlConfigString(localeStr,numberingSystem,outputCalendar){if(hasIntl()){if(outputCalendar||numberingSystem){localeStr+="-u";if(outputCalendar){localeStr+="-ca-"+outputCalendar;} if(numberingSystem){localeStr+="-nu-"+numberingSystem;} return localeStr;}else{return localeStr;}}else{return[];}} function mapMonths(f){var ms=[];for(var i=1;i<=12;i++){var dt=DateTime.utc(2016,i,1);ms.push(f(dt));} return ms;} function mapWeekdays(f){var ms=[];for(var i=1;i<=7;i++){var dt=DateTime.utc(2016,11,13+i);ms.push(f(dt));} return ms;} function listStuff(loc,length,defaultOK,englishFn,intlFn){var mode=loc.listingMode(defaultOK);if(mode==="error"){return null;}else if(mode==="en"){return englishFn(length);}else{return intlFn(length);}} function supportsFastNumbers(loc){if(loc.numberingSystem&&loc.numberingSystem!=="latn"){return false;}else{return loc.numberingSystem==="latn"||!loc.locale||loc.locale.startsWith("en")||hasIntl()&&new Intl.DateTimeFormat(loc.intl).resolvedOptions().numberingSystem==="latn";}} var PolyNumberFormatter=function(){function PolyNumberFormatter(intl,forceSimple,opts){this.padTo=opts.padTo||0;this.floor=opts.floor||false;if(!forceSimple&&hasIntl()){var intlOpts={useGrouping:false};if(opts.padTo>0)intlOpts.minimumIntegerDigits=opts.padTo;this.inf=getCachedINF(intl,intlOpts);}} var _proto=PolyNumberFormatter.prototype;_proto.format=function format(i){if(this.inf){var fixed=this.floor?Math.floor(i):i;return this.inf.format(fixed);}else{var _fixed=this.floor?Math.floor(i):roundTo(i,3);return padStart(_fixed,this.padTo);}};return PolyNumberFormatter;}();var PolyDateFormatter=function(){function PolyDateFormatter(dt,intl,opts){this.opts=opts;this.hasIntl=hasIntl();var z;if(dt.zone.universal&&this.hasIntl){z="UTC";if(opts.timeZoneName){this.dt=dt;}else{this.dt=dt.offset===0?dt:DateTime.fromMillis(dt.ts+dt.offset*60*1000);}}else if(dt.zone.type==="local"){this.dt=dt;}else{this.dt=dt;z=dt.zone.name;} if(this.hasIntl){var intlOpts=Object.assign({},this.opts);if(z){intlOpts.timeZone=z;} this.dtf=getCachedDTF(intl,intlOpts);}} var _proto2=PolyDateFormatter.prototype;_proto2.format=function format(){if(this.hasIntl){return this.dtf.format(this.dt.toJSDate());}else{var tokenFormat=formatString(this.opts),loc=Locale.create("en-US");return Formatter.create(loc).formatDateTimeFromString(this.dt,tokenFormat);}};_proto2.formatToParts=function formatToParts(){if(this.hasIntl&&hasFormatToParts()){return this.dtf.formatToParts(this.dt.toJSDate());}else{return[];}};_proto2.resolvedOptions=function resolvedOptions(){if(this.hasIntl){return this.dtf.resolvedOptions();}else{return{locale:"en-US",numberingSystem:"latn",outputCalendar:"gregory"};}};return PolyDateFormatter;}();var PolyRelFormatter=function(){function PolyRelFormatter(intl,isEnglish,opts){this.opts=Object.assign({style:"long"},opts);if(!isEnglish&&hasRelative()){this.rtf=getCachedRTF(intl,opts);}} var _proto3=PolyRelFormatter.prototype;_proto3.format=function format(count,unit){if(this.rtf){return this.rtf.format(count,unit);}else{return formatRelativeTime(unit,count,this.opts.numeric,this.opts.style!=="long");}};_proto3.formatToParts=function formatToParts(count,unit){if(this.rtf){return this.rtf.formatToParts(count,unit);}else{return[];}};return PolyRelFormatter;}();var Locale=function(){Locale.fromOpts=function fromOpts(opts){return Locale.create(opts.locale,opts.numberingSystem,opts.outputCalendar,opts.defaultToEN);};Locale.create=function create(locale,numberingSystem,outputCalendar,defaultToEN){if(defaultToEN===void 0){defaultToEN=false;} var specifiedLocale=locale||Settings.defaultLocale,localeR=specifiedLocale||(defaultToEN?"en-US":systemLocale()),numberingSystemR=numberingSystem||Settings.defaultNumberingSystem,outputCalendarR=outputCalendar||Settings.defaultOutputCalendar;return new Locale(localeR,numberingSystemR,outputCalendarR,specifiedLocale);};Locale.resetCache=function resetCache(){sysLocaleCache=null;intlDTCache={};intlNumCache={};intlRelCache={};};Locale.fromObject=function fromObject(_temp){var _ref=_temp===void 0?{}:_temp,locale=_ref.locale,numberingSystem=_ref.numberingSystem,outputCalendar=_ref.outputCalendar;return Locale.create(locale,numberingSystem,outputCalendar);};function Locale(locale,numbering,outputCalendar,specifiedLocale){var _parseLocaleString=parseLocaleString(locale),parsedLocale=_parseLocaleString[0],parsedNumberingSystem=_parseLocaleString[1],parsedOutputCalendar=_parseLocaleString[2];this.locale=parsedLocale;this.numberingSystem=numbering||parsedNumberingSystem||null;this.outputCalendar=outputCalendar||parsedOutputCalendar||null;this.intl=intlConfigString(this.locale,this.numberingSystem,this.outputCalendar);this.weekdaysCache={format:{},standalone:{}};this.monthsCache={format:{},standalone:{}};this.meridiemCache=null;this.eraCache={};this.specifiedLocale=specifiedLocale;this.fastNumbersCached=null;} var _proto4=Locale.prototype;_proto4.listingMode=function listingMode(defaultOK){if(defaultOK===void 0){defaultOK=true;} var intl=hasIntl(),hasFTP=intl&&hasFormatToParts(),isActuallyEn=this.isEnglish(),hasNoWeirdness=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");if(!hasFTP&&!(isActuallyEn&&hasNoWeirdness)&&!defaultOK){return"error";}else if(!hasFTP||isActuallyEn&&hasNoWeirdness){return"en";}else{return"intl";}};_proto4.clone=function clone(alts){if(!alts||Object.getOwnPropertyNames(alts).length===0){return this;}else{return Locale.create(alts.locale||this.specifiedLocale,alts.numberingSystem||this.numberingSystem,alts.outputCalendar||this.outputCalendar,alts.defaultToEN||false);}};_proto4.redefaultToEN=function redefaultToEN(alts){if(alts===void 0){alts={};} return this.clone(Object.assign({},alts,{defaultToEN:true}));};_proto4.redefaultToSystem=function redefaultToSystem(alts){if(alts===void 0){alts={};} return this.clone(Object.assign({},alts,{defaultToEN:false}));};_proto4.months=function months$1(length,format,defaultOK){var _this=this;if(format===void 0){format=false;} if(defaultOK===void 0){defaultOK=true;} return listStuff(this,length,defaultOK,months,function(){var intl=format?{month:length,day:"numeric"}:{month:length},formatStr=format?"format":"standalone";if(!_this.monthsCache[formatStr][length]){_this.monthsCache[formatStr][length]=mapMonths(function(dt){return _this.extract(dt,intl,"month");});} return _this.monthsCache[formatStr][length];});};_proto4.weekdays=function weekdays$1(length,format,defaultOK){var _this2=this;if(format===void 0){format=false;} if(defaultOK===void 0){defaultOK=true;} return listStuff(this,length,defaultOK,weekdays,function(){var intl=format?{weekday:length,year:"numeric",month:"long",day:"numeric"}:{weekday:length},formatStr=format?"format":"standalone";if(!_this2.weekdaysCache[formatStr][length]){_this2.weekdaysCache[formatStr][length]=mapWeekdays(function(dt){return _this2.extract(dt,intl,"weekday");});} return _this2.weekdaysCache[formatStr][length];});};_proto4.meridiems=function meridiems$1(defaultOK){var _this3=this;if(defaultOK===void 0){defaultOK=true;} return listStuff(this,undefined,defaultOK,function(){return meridiems;},function(){if(!_this3.meridiemCache){var intl={hour:"numeric",hour12:true};_this3.meridiemCache=[DateTime.utc(2016,11,13,9),DateTime.utc(2016,11,13,19)].map(function(dt){return _this3.extract(dt,intl,"dayperiod");});} return _this3.meridiemCache;});};_proto4.eras=function eras$1(length,defaultOK){var _this4=this;if(defaultOK===void 0){defaultOK=true;} return listStuff(this,length,defaultOK,eras,function(){var intl={era:length};if(!_this4.eraCache[length]){_this4.eraCache[length]=[DateTime.utc(-40,1,1),DateTime.utc(2017,1,1)].map(function(dt){return _this4.extract(dt,intl,"era");});} return _this4.eraCache[length];});};_proto4.extract=function extract(dt,intlOpts,field){var df=this.dtFormatter(dt,intlOpts),results=df.formatToParts(),matching=results.find(function(m){return m.type.toLowerCase()===field;});return matching?matching.value:null;};_proto4.numberFormatter=function numberFormatter(opts){if(opts===void 0){opts={};} return new PolyNumberFormatter(this.intl,opts.forceSimple||this.fastNumbers,opts);};_proto4.dtFormatter=function dtFormatter(dt,intlOpts){if(intlOpts===void 0){intlOpts={};} return new PolyDateFormatter(dt,this.intl,intlOpts);};_proto4.relFormatter=function relFormatter(opts){if(opts===void 0){opts={};} return new PolyRelFormatter(this.intl,this.isEnglish(),opts);};_proto4.isEnglish=function isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||hasIntl()&&new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us");};_proto4.equals=function equals(other){return this.locale===other.locale&&this.numberingSystem===other.numberingSystem&&this.outputCalendar===other.outputCalendar;};_createClass(Locale,[{key:"fastNumbers",get:function get(){if(this.fastNumbersCached==null){this.fastNumbersCached=supportsFastNumbers(this);} return this.fastNumbersCached;}}]);return Locale;}();function combineRegexes(){for(var _len=arguments.length,regexes=new Array(_len),_key=0;_key<_len;_key++){regexes[_key]=arguments[_key];} var full=regexes.reduce(function(f,r){return f+r.source;},"");return RegExp("^"+full+"$");} function combineExtractors(){for(var _len2=arguments.length,extractors=new Array(_len2),_key2=0;_key2<_len2;_key2++){extractors[_key2]=arguments[_key2];} return function(m){return extractors.reduce(function(_ref,ex){var mergedVals=_ref[0],mergedZone=_ref[1],cursor=_ref[2];var _ex=ex(m,cursor),val=_ex[0],zone=_ex[1],next=_ex[2];return[Object.assign(mergedVals,val),mergedZone||zone,next];},[{},null,1]).slice(0,2);};} function parse(s){if(s==null){return[null,null];} for(var _len3=arguments.length,patterns=new Array(_len3>1?_len3-1:0),_key3=1;_key3<_len3;_key3++){patterns[_key3-1]=arguments[_key3];} for(var _i=0,_patterns=patterns;_i<_patterns.length;_i++){var _patterns$_i=_patterns[_i],regex=_patterns$_i[0],extractor=_patterns$_i[1];var m=regex.exec(s);if(m){return extractor(m);}} return[null,null];} function simpleParse(){for(var _len4=arguments.length,keys=new Array(_len4),_key4=0;_key4<_len4;_key4++){keys[_key4]=arguments[_key4];} return function(match,cursor){var ret={};var i;for(i=0;i3?weekdaysLong.indexOf(weekdayStr)+1:weekdaysShort.indexOf(weekdayStr)+1;} return result;} var rfc2822=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function extractRFC2822(match){var weekdayStr=match[1],dayStr=match[2],monthStr=match[3],yearStr=match[4],hourStr=match[5],minuteStr=match[6],secondStr=match[7],obsOffset=match[8],milOffset=match[9],offHourStr=match[10],offMinuteStr=match[11],result=fromStrings(weekdayStr,yearStr,monthStr,dayStr,hourStr,minuteStr,secondStr);var offset;if(obsOffset){offset=obsOffsets[obsOffset];}else if(milOffset){offset=0;}else{offset=signedOffset(offHourStr,offMinuteStr);} return[result,new FixedOffsetZone(offset)];} function preprocessRFC2822(s){return s.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim();} var rfc1123=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,rfc850=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,ascii=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function extractRFC1123Or850(match){var weekdayStr=match[1],dayStr=match[2],monthStr=match[3],yearStr=match[4],hourStr=match[5],minuteStr=match[6],secondStr=match[7],result=fromStrings(weekdayStr,yearStr,monthStr,dayStr,hourStr,minuteStr,secondStr);return[result,FixedOffsetZone.utcInstance];} function extractASCII(match){var weekdayStr=match[1],monthStr=match[2],dayStr=match[3],hourStr=match[4],minuteStr=match[5],secondStr=match[6],yearStr=match[7],result=fromStrings(weekdayStr,yearStr,monthStr,dayStr,hourStr,minuteStr,secondStr);return[result,FixedOffsetZone.utcInstance];} var isoYmdWithTimeExtensionRegex=combineRegexes(isoYmdRegex,isoTimeExtensionRegex);var isoWeekWithTimeExtensionRegex=combineRegexes(isoWeekRegex,isoTimeExtensionRegex);var isoOrdinalWithTimeExtensionRegex=combineRegexes(isoOrdinalRegex,isoTimeExtensionRegex);var isoTimeCombinedRegex=combineRegexes(isoTimeRegex);var extractISOYmdTimeAndOffset=combineExtractors(extractISOYmd,extractISOTime,extractISOOffset);var extractISOWeekTimeAndOffset=combineExtractors(extractISOWeekData,extractISOTime,extractISOOffset);var extractISOOrdinalDataAndTime=combineExtractors(extractISOOrdinalData,extractISOTime);var extractISOTimeAndOffset=combineExtractors(extractISOTime,extractISOOffset);function parseISODate(s){return parse(s,[isoYmdWithTimeExtensionRegex,extractISOYmdTimeAndOffset],[isoWeekWithTimeExtensionRegex,extractISOWeekTimeAndOffset],[isoOrdinalWithTimeExtensionRegex,extractISOOrdinalDataAndTime],[isoTimeCombinedRegex,extractISOTimeAndOffset]);} function parseRFC2822Date(s){return parse(preprocessRFC2822(s),[rfc2822,extractRFC2822]);} function parseHTTPDate(s){return parse(s,[rfc1123,extractRFC1123Or850],[rfc850,extractRFC1123Or850],[ascii,extractASCII]);} function parseISODuration(s){return parse(s,[isoDuration,extractISODuration]);} var sqlYmdWithTimeExtensionRegex=combineRegexes(sqlYmdRegex,sqlTimeExtensionRegex);var sqlTimeCombinedRegex=combineRegexes(sqlTimeRegex);var extractISOYmdTimeOffsetAndIANAZone=combineExtractors(extractISOYmd,extractISOTime,extractISOOffset,extractIANAZone);var extractISOTimeOffsetAndIANAZone=combineExtractors(extractISOTime,extractISOOffset,extractIANAZone);function parseSQL(s){return parse(s,[sqlYmdWithTimeExtensionRegex,extractISOYmdTimeOffsetAndIANAZone],[sqlTimeCombinedRegex,extractISOTimeOffsetAndIANAZone]);} var INVALID="Invalid Duration";var lowOrderMatrix={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1000},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1000},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1000},minutes:{seconds:60,milliseconds:60*1000},seconds:{milliseconds:1000}},casualMatrix=Object.assign({years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1000},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1000},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1000}},lowOrderMatrix),daysInYearAccurate=146097.0/400,daysInMonthAccurate=146097.0/4800,accurateMatrix=Object.assign({years:{quarters:4,months:12,weeks:daysInYearAccurate/7,days:daysInYearAccurate,hours:daysInYearAccurate*24,minutes:daysInYearAccurate*24*60,seconds:daysInYearAccurate*24*60*60,milliseconds:daysInYearAccurate*24*60*60*1000},quarters:{months:3,weeks:daysInYearAccurate/28,days:daysInYearAccurate/4,hours:daysInYearAccurate*24/4,minutes:daysInYearAccurate*24*60/4,seconds:daysInYearAccurate*24*60*60/4,milliseconds:daysInYearAccurate*24*60*60*1000/4},months:{weeks:daysInMonthAccurate/7,days:daysInMonthAccurate,hours:daysInMonthAccurate*24,minutes:daysInMonthAccurate*24*60,seconds:daysInMonthAccurate*24*60*60,milliseconds:daysInMonthAccurate*24*60*60*1000}},lowOrderMatrix);var orderedUnits=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"];var reverseUnits=orderedUnits.slice(0).reverse();function clone(dur,alts,clear){if(clear===void 0){clear=false;} var conf={values:clear?alts.values:Object.assign({},dur.values,alts.values||{}),loc:dur.loc.clone(alts.loc),conversionAccuracy:alts.conversionAccuracy||dur.conversionAccuracy};return new Duration(conf);} function antiTrunc(n){return n<0?Math.floor(n):Math.ceil(n);} function convert(matrix,fromMap,fromUnit,toMap,toUnit){var conv=matrix[toUnit][fromUnit],raw=fromMap[fromUnit]/conv,sameSign=Math.sign(raw)===Math.sign(toMap[toUnit]),added=!sameSign&&toMap[toUnit]!==0&&Math.abs(raw)<=1?antiTrunc(raw):Math.trunc(raw);toMap[toUnit]+=added;fromMap[fromUnit]-=added*conv;} function normalizeValues(matrix,vals){reverseUnits.reduce(function(previous,current){if(!isUndefined(vals[current])){if(previous){convert(matrix,vals,previous,vals,current);} return current;}else{return previous;}},null);} var Duration=function(){function Duration(config){var accurate=config.conversionAccuracy==="longterm"||false;this.values=config.values;this.loc=config.loc||Locale.create();this.conversionAccuracy=accurate?"longterm":"casual";this.invalid=config.invalid||null;this.matrix=accurate?accurateMatrix:casualMatrix;this.isLuxonDuration=true;} Duration.fromMillis=function fromMillis(count,opts){return Duration.fromObject(Object.assign({milliseconds:count},opts));};Duration.fromObject=function fromObject(obj){if(obj==null||typeof obj!=="object"){throw new InvalidArgumentError("Duration.fromObject: argument expected to be an object, got "+(obj===null?"null":typeof obj));} return new Duration({values:normalizeObject(obj,Duration.normalizeUnit,["locale","numberingSystem","conversionAccuracy","zone"]),loc:Locale.fromObject(obj),conversionAccuracy:obj.conversionAccuracy});};Duration.fromISO=function fromISO(text,opts){var _parseISODuration=parseISODuration(text),parsed=_parseISODuration[0];if(parsed){var obj=Object.assign(parsed,opts);return Duration.fromObject(obj);}else{return Duration.invalid("unparsable","the input \""+text+"\" can't be parsed as ISO 8601");}};Duration.invalid=function invalid(reason,explanation){if(explanation===void 0){explanation=null;} if(!reason){throw new InvalidArgumentError("need to specify a reason the Duration is invalid");} var invalid=reason instanceof Invalid?reason:new Invalid(reason,explanation);if(Settings.throwOnInvalid){throw new InvalidDurationError(invalid);}else{return new Duration({invalid:invalid});}};Duration.normalizeUnit=function normalizeUnit(unit){var normalized={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[unit?unit.toLowerCase():unit];if(!normalized)throw new InvalidUnitError(unit);return normalized;};Duration.isDuration=function isDuration(o){return o&&o.isLuxonDuration||false;};var _proto=Duration.prototype;_proto.toFormat=function toFormat(fmt,opts){if(opts===void 0){opts={};} var fmtOpts=Object.assign({},opts,{floor:opts.round!==false&&opts.floor!==false});return this.isValid?Formatter.create(this.loc,fmtOpts).formatDurationFromString(this,fmt):INVALID;};_proto.toObject=function toObject(opts){if(opts===void 0){opts={};} if(!this.isValid)return{};var base=Object.assign({},this.values);if(opts.includeConfig){base.conversionAccuracy=this.conversionAccuracy;base.numberingSystem=this.loc.numberingSystem;base.locale=this.loc.locale;} return base;};_proto.toISO=function toISO(){if(!this.isValid)return null;var s="P";if(this.years!==0)s+=this.years+"Y";if(this.months!==0||this.quarters!==0)s+=this.months+this.quarters*3+"M";if(this.weeks!==0)s+=this.weeks+"W";if(this.days!==0)s+=this.days+"D";if(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)s+="T";if(this.hours!==0)s+=this.hours+"H";if(this.minutes!==0)s+=this.minutes+"M";if(this.seconds!==0||this.milliseconds!==0) s+=roundTo(this.seconds+this.milliseconds/1000,3)+"S";if(s==="P")s+="T0S";return s;};_proto.toJSON=function toJSON(){return this.toISO();};_proto.toString=function toString(){return this.toISO();};_proto.valueOf=function valueOf(){return this.as("milliseconds");};_proto.plus=function plus(duration){if(!this.isValid)return this;var dur=friendlyDuration(duration),result={};for(var _iterator=_createForOfIteratorHelperLoose(orderedUnits),_step;!(_step=_iterator()).done;){var k=_step.value;if(hasOwnProperty(dur.values,k)||hasOwnProperty(this.values,k)){result[k]=dur.get(k)+this.get(k);}} return clone(this,{values:result},true);};_proto.minus=function minus(duration){if(!this.isValid)return this;var dur=friendlyDuration(duration);return this.plus(dur.negate());};_proto.mapUnits=function mapUnits(fn){if(!this.isValid)return this;var result={};for(var _i=0,_Object$keys=Object.keys(this.values);_i<_Object$keys.length;_i++){var k=_Object$keys[_i];result[k]=asNumber(fn(this.values[k],k));} return clone(this,{values:result},true);};_proto.get=function get(unit){return this[Duration.normalizeUnit(unit)];};_proto.set=function set(values){if(!this.isValid)return this;var mixed=Object.assign(this.values,normalizeObject(values,Duration.normalizeUnit,[]));return clone(this,{values:mixed});};_proto.reconfigure=function reconfigure(_temp){var _ref=_temp===void 0?{}:_temp,locale=_ref.locale,numberingSystem=_ref.numberingSystem,conversionAccuracy=_ref.conversionAccuracy;var loc=this.loc.clone({locale:locale,numberingSystem:numberingSystem}),opts={loc:loc};if(conversionAccuracy){opts.conversionAccuracy=conversionAccuracy;} return clone(this,opts);};_proto.as=function as(unit){return this.isValid?this.shiftTo(unit).get(unit):NaN;};_proto.normalize=function normalize(){if(!this.isValid)return this;var vals=this.toObject();normalizeValues(this.matrix,vals);return clone(this,{values:vals},true);};_proto.shiftTo=function shiftTo(){for(var _len=arguments.length,units=new Array(_len),_key=0;_key<_len;_key++){units[_key]=arguments[_key];} if(!this.isValid)return this;if(units.length===0){return this;} units=units.map(function(u){return Duration.normalizeUnit(u);});var built={},accumulated={},vals=this.toObject();var lastUnit;for(var _iterator2=_createForOfIteratorHelperLoose(orderedUnits),_step2;!(_step2=_iterator2()).done;){var k=_step2.value;if(units.indexOf(k)>=0){lastUnit=k;var own=0;for(var ak in accumulated){own+=this.matrix[ak][k]*accumulated[ak];accumulated[ak]=0;} if(isNumber(vals[k])){own+=vals[k];} var i=Math.trunc(own);built[k]=i;accumulated[k]=own-i;for(var down in vals){if(orderedUnits.indexOf(down)>orderedUnits.indexOf(k)){convert(this.matrix,vals,down,built,k);}}}else if(isNumber(vals[k])){accumulated[k]=vals[k];}} for(var key in accumulated){if(accumulated[key]!==0){built[lastUnit]+=key===lastUnit?accumulated[key]:accumulated[key]/this.matrix[lastUnit][key];}} return clone(this,{values:built},true).normalize();};_proto.negate=function negate(){if(!this.isValid)return this;var negated={};for(var _i2=0,_Object$keys2=Object.keys(this.values);_i2<_Object$keys2.length;_i2++){var k=_Object$keys2[_i2];negated[k]=-this.values[k];} return clone(this,{values:negated},true);};_proto.equals=function equals(other){if(!this.isValid||!other.isValid){return false;} if(!this.loc.equals(other.loc)){return false;} for(var _iterator3=_createForOfIteratorHelperLoose(orderedUnits),_step3;!(_step3=_iterator3()).done;){var u=_step3.value;if(this.values[u]!==other.values[u]){return false;}} return true;};_createClass(Duration,[{key:"locale",get:function get(){return this.isValid?this.loc.locale:null;}},{key:"numberingSystem",get:function get(){return this.isValid?this.loc.numberingSystem:null;}},{key:"years",get:function get(){return this.isValid?this.values.years||0:NaN;}},{key:"quarters",get:function get(){return this.isValid?this.values.quarters||0:NaN;}},{key:"months",get:function get(){return this.isValid?this.values.months||0:NaN;}},{key:"weeks",get:function get(){return this.isValid?this.values.weeks||0:NaN;}},{key:"days",get:function get(){return this.isValid?this.values.days||0:NaN;}},{key:"hours",get:function get(){return this.isValid?this.values.hours||0:NaN;}},{key:"minutes",get:function get(){return this.isValid?this.values.minutes||0:NaN;}},{key:"seconds",get:function get(){return this.isValid?this.values.seconds||0:NaN;}},{key:"milliseconds",get:function get(){return this.isValid?this.values.milliseconds||0:NaN;}},{key:"isValid",get:function get(){return this.invalid===null;}},{key:"invalidReason",get:function get(){return this.invalid?this.invalid.reason:null;}},{key:"invalidExplanation",get:function get(){return this.invalid?this.invalid.explanation:null;}}]);return Duration;}();function friendlyDuration(durationish){if(isNumber(durationish)){return Duration.fromMillis(durationish);}else if(Duration.isDuration(durationish)){return durationish;}else if(typeof durationish==="object"){return Duration.fromObject(durationish);}else{throw new InvalidArgumentError("Unknown duration argument "+durationish+" of type "+typeof durationish);}} var INVALID$1="Invalid Interval";function validateStartEnd(start,end){if(!start||!start.isValid){return Interval.invalid("missing or invalid start");}else if(!end||!end.isValid){return Interval.invalid("missing or invalid end");}else if(enddateTime;};_proto.isBefore=function isBefore(dateTime){if(!this.isValid)return false;return this.e<=dateTime;};_proto.contains=function contains(dateTime){if(!this.isValid)return false;return this.s<=dateTime&&this.e>dateTime;};_proto.set=function set(_temp){var _ref=_temp===void 0?{}:_temp,start=_ref.start,end=_ref.end;if(!this.isValid)return this;return Interval.fromDateTimes(start||this.s,end||this.e);};_proto.splitAt=function splitAt(){var _this=this;if(!this.isValid)return[];for(var _len=arguments.length,dateTimes=new Array(_len),_key=0;_key<_len;_key++){dateTimes[_key]=arguments[_key];} var sorted=dateTimes.map(friendlyDateTime).filter(function(d){return _this.contains(d);}).sort(),results=[];var s=this.s,i=0;while(s+this.e?this.e:added;results.push(Interval.fromDateTimes(s,next));s=next;i+=1;} return results;};_proto.splitBy=function splitBy(duration){var dur=friendlyDuration(duration);if(!this.isValid||!dur.isValid||dur.as("milliseconds")===0){return[];} var s=this.s,added,next;var results=[];while(s+this.e?this.e:added;results.push(Interval.fromDateTimes(s,next));s=next;} return results;};_proto.divideEqually=function divideEqually(numberOfParts){if(!this.isValid)return[];return this.splitBy(this.length()/numberOfParts).slice(0,numberOfParts);};_proto.overlaps=function overlaps(other){return this.e>other.s&&this.s=other.e;};_proto.equals=function equals(other){if(!this.isValid||!other.isValid){return false;} return this.s.equals(other.s)&&this.e.equals(other.e);};_proto.intersection=function intersection(other){if(!this.isValid)return this;var s=this.s>other.s?this.s:other.s,e=this.ee){return null;}else{return Interval.fromDateTimes(s,e);}};_proto.union=function union(other){if(!this.isValid)return this;var s=this.sother.e?this.e:other.e;return Interval.fromDateTimes(s,e);};Interval.merge=function merge(intervals){var _intervals$sort$reduc=intervals.sort(function(a,b){return a.s-b.s;}).reduce(function(_ref2,item){var sofar=_ref2[0],current=_ref2[1];if(!current){return[sofar,item];}else if(current.overlaps(item)||current.abutsStart(item)){return[sofar,current.union(item)];}else{return[sofar.concat([current]),item];}},[[],null]),found=_intervals$sort$reduc[0],final=_intervals$sort$reduc[1];if(final){found.push(final);} return found;};Interval.xor=function xor(intervals){var _Array$prototype;var start=null,currentCount=0;var results=[],ends=intervals.map(function(i){return[{time:i.s,type:"s"},{time:i.e,type:"e"}];}),flattened=(_Array$prototype=Array.prototype).concat.apply(_Array$prototype,ends),arr=flattened.sort(function(a,b){return a.time-b.time;});for(var _iterator=_createForOfIteratorHelperLoose(arr),_step;!(_step=_iterator()).done;){var i=_step.value;currentCount+=i.type==="s"?1:-1;if(currentCount===1){start=i.time;}else{if(start&&+start!==+i.time){results.push(Interval.fromDateTimes(start,i.time));} start=null;}} return Interval.merge(results);};_proto.difference=function difference(){var _this2=this;for(var _len2=arguments.length,intervals=new Array(_len2),_key2=0;_key2<_len2;_key2++){intervals[_key2]=arguments[_key2];} return Interval.xor([this].concat(intervals)).map(function(i){return _this2.intersection(i);}).filter(function(i){return i&&!i.isEmpty();});};_proto.toString=function toString(){if(!this.isValid)return INVALID$1;return"["+this.s.toISO()+" \u2013 "+this.e.toISO()+")";};_proto.toISO=function toISO(opts){if(!this.isValid)return INVALID$1;return this.s.toISO(opts)+"/"+this.e.toISO(opts);};_proto.toISODate=function toISODate(){if(!this.isValid)return INVALID$1;return this.s.toISODate()+"/"+this.e.toISODate();};_proto.toISOTime=function toISOTime(opts){if(!this.isValid)return INVALID$1;return this.s.toISOTime(opts)+"/"+this.e.toISOTime(opts);};_proto.toFormat=function toFormat(dateFormat,_temp2){var _ref3=_temp2===void 0?{}:_temp2,_ref3$separator=_ref3.separator,separator=_ref3$separator===void 0?" – ":_ref3$separator;if(!this.isValid)return INVALID$1;return""+this.s.toFormat(dateFormat)+separator+this.e.toFormat(dateFormat);};_proto.toDuration=function toDuration(unit,opts){if(!this.isValid){return Duration.invalid(this.invalidReason);} return this.e.diff(this.s,unit,opts);};_proto.mapEndpoints=function mapEndpoints(mapFn){return Interval.fromDateTimes(mapFn(this.s),mapFn(this.e));};_createClass(Interval,[{key:"start",get:function get(){return this.isValid?this.s:null;}},{key:"end",get:function get(){return this.isValid?this.e:null;}},{key:"isValid",get:function get(){return this.invalidReason===null;}},{key:"invalidReason",get:function get(){return this.invalid?this.invalid.reason:null;}},{key:"invalidExplanation",get:function get(){return this.invalid?this.invalid.explanation:null;}}]);return Interval;}();var Info=function(){function Info(){} Info.hasDST=function hasDST(zone){if(zone===void 0){zone=Settings.defaultZone;} var proto=DateTime.local().setZone(zone).set({month:12});return!zone.universal&&proto.offset!==proto.set({month:6}).offset;};Info.isValidIANAZone=function isValidIANAZone(zone){return IANAZone.isValidSpecifier(zone)&&IANAZone.isValidZone(zone);};Info.normalizeZone=function normalizeZone$1(input){return normalizeZone(input,Settings.defaultZone);};Info.months=function months(length,_temp){if(length===void 0){length="long";} var _ref=_temp===void 0?{}:_temp,_ref$locale=_ref.locale,locale=_ref$locale===void 0?null:_ref$locale,_ref$numberingSystem=_ref.numberingSystem,numberingSystem=_ref$numberingSystem===void 0?null:_ref$numberingSystem,_ref$outputCalendar=_ref.outputCalendar,outputCalendar=_ref$outputCalendar===void 0?"gregory":_ref$outputCalendar;return Locale.create(locale,numberingSystem,outputCalendar).months(length);};Info.monthsFormat=function monthsFormat(length,_temp2){if(length===void 0){length="long";} var _ref2=_temp2===void 0?{}:_temp2,_ref2$locale=_ref2.locale,locale=_ref2$locale===void 0?null:_ref2$locale,_ref2$numberingSystem=_ref2.numberingSystem,numberingSystem=_ref2$numberingSystem===void 0?null:_ref2$numberingSystem,_ref2$outputCalendar=_ref2.outputCalendar,outputCalendar=_ref2$outputCalendar===void 0?"gregory":_ref2$outputCalendar;return Locale.create(locale,numberingSystem,outputCalendar).months(length,true);};Info.weekdays=function weekdays(length,_temp3){if(length===void 0){length="long";} var _ref3=_temp3===void 0?{}:_temp3,_ref3$locale=_ref3.locale,locale=_ref3$locale===void 0?null:_ref3$locale,_ref3$numberingSystem=_ref3.numberingSystem,numberingSystem=_ref3$numberingSystem===void 0?null:_ref3$numberingSystem;return Locale.create(locale,numberingSystem,null).weekdays(length);};Info.weekdaysFormat=function weekdaysFormat(length,_temp4){if(length===void 0){length="long";} var _ref4=_temp4===void 0?{}:_temp4,_ref4$locale=_ref4.locale,locale=_ref4$locale===void 0?null:_ref4$locale,_ref4$numberingSystem=_ref4.numberingSystem,numberingSystem=_ref4$numberingSystem===void 0?null:_ref4$numberingSystem;return Locale.create(locale,numberingSystem,null).weekdays(length,true);};Info.meridiems=function meridiems(_temp5){var _ref5=_temp5===void 0?{}:_temp5,_ref5$locale=_ref5.locale,locale=_ref5$locale===void 0?null:_ref5$locale;return Locale.create(locale).meridiems();};Info.eras=function eras(length,_temp6){if(length===void 0){length="short";} var _ref6=_temp6===void 0?{}:_temp6,_ref6$locale=_ref6.locale,locale=_ref6$locale===void 0?null:_ref6$locale;return Locale.create(locale,null,"gregory").eras(length);};Info.features=function features(){var intl=false,intlTokens=false,zones=false,relative=false;if(hasIntl()){intl=true;intlTokens=hasFormatToParts();relative=hasRelative();try{zones=new Intl.DateTimeFormat("en",{timeZone:"America/New_York"}).resolvedOptions().timeZone==="America/New_York";}catch(e){zones=false;}} return{intl:intl,intlTokens:intlTokens,zones:zones,relative:relative};};return Info;}();function dayDiff(earlier,later){var utcDayStart=function utcDayStart(dt){return dt.toUTC(0,{keepLocalTime:true}).startOf("day").valueOf();},ms=utcDayStart(later)-utcDayStart(earlier);return Math.floor(Duration.fromMillis(ms).as("days"));} function highOrderDiffs(cursor,later,units){var differs=[["years",function(a,b){return b.year-a.year;}],["months",function(a,b){return b.month-a.month+(b.year-a.year)*12;}],["weeks",function(a,b){var days=dayDiff(a,b);return(days-days%7)/7;}],["days",dayDiff]];var results={};var lowestOrder,highWater;for(var _i=0,_differs=differs;_i<_differs.length;_i++){var _differs$_i=_differs[_i],unit=_differs$_i[0],differ=_differs$_i[1];if(units.indexOf(unit)>=0){var _cursor$plus;lowestOrder=unit;var delta=differ(cursor,later);highWater=cursor.plus((_cursor$plus={},_cursor$plus[unit]=delta,_cursor$plus));if(highWater>later){var _cursor$plus2;cursor=cursor.plus((_cursor$plus2={},_cursor$plus2[unit]=delta-1,_cursor$plus2));delta-=1;}else{cursor=highWater;} results[unit]=delta;}} return[cursor,results,highWater,lowestOrder];} function _diff(earlier,later,units,opts){var _highOrderDiffs=highOrderDiffs(earlier,later,units),cursor=_highOrderDiffs[0],results=_highOrderDiffs[1],highWater=_highOrderDiffs[2],lowestOrder=_highOrderDiffs[3];var remainingMillis=later-cursor;var lowerOrderUnits=units.filter(function(u){return["hours","minutes","seconds","milliseconds"].indexOf(u)>=0;});if(lowerOrderUnits.length===0){if(highWater0){var _Duration$fromMillis;return(_Duration$fromMillis=Duration.fromMillis(remainingMillis,opts)).shiftTo.apply(_Duration$fromMillis,lowerOrderUnits).plus(duration);}else{return duration;}} var numberingSystems={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"};var numberingSystemsUTF16={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]};var hanidecChars=numberingSystems.hanidec.replace(/[\[|\]]/g,"").split("");function parseDigits(str){var value=parseInt(str,10);if(isNaN(value)){value="";for(var i=0;i=min&&code<=max){value+=code-min;}}}} return parseInt(value,10);}else{return value;}} function digitRegex(_ref,append){var numberingSystem=_ref.numberingSystem;if(append===void 0){append="";} return new RegExp(""+numberingSystems[numberingSystem||"latn"]+append);} var MISSING_FTP="missing Intl.DateTimeFormat.formatToParts support";function intUnit(regex,post){if(post===void 0){post=function post(i){return i;};} return{regex:regex,deser:function deser(_ref){var s=_ref[0];return post(parseDigits(s));}};} var NBSP=String.fromCharCode(160);var spaceOrNBSP="[ "+NBSP+"]";var spaceOrNBSPRegExp=new RegExp(spaceOrNBSP,"g");function fixListRegex(s){return s.replace(/\./g,"\\.?").replace(spaceOrNBSPRegExp,spaceOrNBSP);} function stripInsensitivities(s){return s.replace(/\./g,"").replace(spaceOrNBSPRegExp," ").toLowerCase();} function oneOf(strings,startIndex){if(strings===null){return null;}else{return{regex:RegExp(strings.map(fixListRegex).join("|")),deser:function deser(_ref2){var s=_ref2[0];return strings.findIndex(function(i){return stripInsensitivities(s)===stripInsensitivities(i);})+startIndex;}};}} function offset(regex,groups){return{regex:regex,deser:function deser(_ref3){var h=_ref3[1],m=_ref3[2];return signedOffset(h,m);},groups:groups};} function simple(regex){return{regex:regex,deser:function deser(_ref4){var s=_ref4[0];return s;}};} function escapeToken(value){return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");} function unitForToken(token,loc){var one=digitRegex(loc),two=digitRegex(loc,"{2}"),three=digitRegex(loc,"{3}"),four=digitRegex(loc,"{4}"),six=digitRegex(loc,"{6}"),oneOrTwo=digitRegex(loc,"{1,2}"),oneToThree=digitRegex(loc,"{1,3}"),oneToSix=digitRegex(loc,"{1,6}"),oneToNine=digitRegex(loc,"{1,9}"),twoToFour=digitRegex(loc,"{2,4}"),fourToSix=digitRegex(loc,"{4,6}"),literal=function literal(t){return{regex:RegExp(escapeToken(t.val)),deser:function deser(_ref5){var s=_ref5[0];return s;},literal:true};},unitate=function unitate(t){if(token.literal){return literal(t);} switch(t.val){case"G":return oneOf(loc.eras("short",false),0);case"GG":return oneOf(loc.eras("long",false),0);case"y":return intUnit(oneToSix);case"yy":return intUnit(twoToFour,untruncateYear);case"yyyy":return intUnit(four);case"yyyyy":return intUnit(fourToSix);case"yyyyyy":return intUnit(six);case"M":return intUnit(oneOrTwo);case"MM":return intUnit(two);case"MMM":return oneOf(loc.months("short",true,false),1);case"MMMM":return oneOf(loc.months("long",true,false),1);case"L":return intUnit(oneOrTwo);case"LL":return intUnit(two);case"LLL":return oneOf(loc.months("short",false,false),1);case"LLLL":return oneOf(loc.months("long",false,false),1);case"d":return intUnit(oneOrTwo);case"dd":return intUnit(two);case"o":return intUnit(oneToThree);case"ooo":return intUnit(three);case"HH":return intUnit(two);case"H":return intUnit(oneOrTwo);case"hh":return intUnit(two);case"h":return intUnit(oneOrTwo);case"mm":return intUnit(two);case"m":return intUnit(oneOrTwo);case"q":return intUnit(oneOrTwo);case"qq":return intUnit(two);case"s":return intUnit(oneOrTwo);case"ss":return intUnit(two);case"S":return intUnit(oneToThree);case"SSS":return intUnit(three);case"u":return simple(oneToNine);case"a":return oneOf(loc.meridiems(),0);case"kkkk":return intUnit(four);case"kk":return intUnit(twoToFour,untruncateYear);case"W":return intUnit(oneOrTwo);case"WW":return intUnit(two);case"E":case"c":return intUnit(one);case"EEE":return oneOf(loc.weekdays("short",false,false),1);case"EEEE":return oneOf(loc.weekdays("long",false,false),1);case"ccc":return oneOf(loc.weekdays("short",true,false),1);case"cccc":return oneOf(loc.weekdays("long",true,false),1);case"Z":case"ZZ":return offset(new RegExp("([+-]"+oneOrTwo.source+")(?::("+two.source+"))?"),2);case"ZZZ":return offset(new RegExp("([+-]"+oneOrTwo.source+")("+two.source+")?"),2);case"z":return simple(/[a-z_+-/]{1,256}?/i);default:return literal(t);}};var unit=unitate(token)||{invalidReason:MISSING_FTP};unit.token=token;return unit;} var partTypeStyleToTokenVal={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}};function tokenForPart(part,locale,formatOpts){var type=part.type,value=part.value;if(type==="literal"){return{literal:true,val:value};} var style=formatOpts[type];var val=partTypeStyleToTokenVal[type];if(typeof val==="object"){val=val[style];} if(val){return{literal:false,val:val};} return undefined;} function buildRegex(units){var re=units.map(function(u){return u.regex;}).reduce(function(f,r){return f+"("+r.source+")";},"");return["^"+re+"$",units];} function match(input,regex,handlers){var matches=input.match(regex);if(matches){var all={};var matchIndex=1;for(var i in handlers){if(hasOwnProperty(handlers,i)){var h=handlers[i],groups=h.groups?h.groups+1:1;if(!h.literal&&h.token){all[h.token.val[0]]=h.deser(matches.slice(matchIndex,matchIndex+groups));} matchIndex+=groups;}} return[matches,all];}else{return[matches,{}];}} function dateTimeFromMatches(matches){var toField=function toField(token){switch(token){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null;}};var zone;if(!isUndefined(matches.Z)){zone=new FixedOffsetZone(matches.Z);}else if(!isUndefined(matches.z)){zone=IANAZone.create(matches.z);}else{zone=null;} if(!isUndefined(matches.q)){matches.M=(matches.q-1)*3+1;} if(!isUndefined(matches.h)){if(matches.h<12&&matches.a===1){matches.h+=12;}else if(matches.h===12&&matches.a===0){matches.h=0;}} if(matches.G===0&&matches.y){matches.y=-matches.y;} if(!isUndefined(matches.u)){matches.S=parseMillis(matches.u);} var vals=Object.keys(matches).reduce(function(r,k){var f=toField(k);if(f){r[f]=matches[k];} return r;},{});return[vals,zone];} var dummyDateTimeCache=null;function getDummyDateTime(){if(!dummyDateTimeCache){dummyDateTimeCache=DateTime.fromMillis(1555555555555);} return dummyDateTimeCache;} function maybeExpandMacroToken(token,locale){if(token.literal){return token;} var formatOpts=Formatter.macroTokenToFormatOpts(token.val);if(!formatOpts){return token;} var formatter=Formatter.create(locale,formatOpts);var parts=formatter.formatDateTimeParts(getDummyDateTime());var tokens=parts.map(function(p){return tokenForPart(p,locale,formatOpts);});if(tokens.includes(undefined)){return token;} return tokens;} function expandMacroTokens(tokens,locale){var _Array$prototype;return(_Array$prototype=Array.prototype).concat.apply(_Array$prototype,tokens.map(function(t){return maybeExpandMacroToken(t,locale);}));} function explainFromTokens(locale,input,format){var tokens=expandMacroTokens(Formatter.parseFormat(format),locale),units=tokens.map(function(t){return unitForToken(t,locale);}),disqualifyingUnit=units.find(function(t){return t.invalidReason;});if(disqualifyingUnit){return{input:input,tokens:tokens,invalidReason:disqualifyingUnit.invalidReason};}else{var _buildRegex=buildRegex(units),regexString=_buildRegex[0],handlers=_buildRegex[1],regex=RegExp(regexString,"i"),_match=match(input,regex,handlers),rawMatches=_match[0],matches=_match[1],_ref6=matches?dateTimeFromMatches(matches):[null,null],result=_ref6[0],zone=_ref6[1];if(hasOwnProperty(matches,"a")&&hasOwnProperty(matches,"H")){throw new ConflictingSpecificationError("Can't include meridiem when specifying 24-hour format");} return{input:input,tokens:tokens,regex:regex,rawMatches:rawMatches,matches:matches,result:result,zone:zone};}} function parseFromTokens(locale,input,format){var _explainFromTokens=explainFromTokens(locale,input,format),result=_explainFromTokens.result,zone=_explainFromTokens.zone,invalidReason=_explainFromTokens.invalidReason;return[result,zone,invalidReason];} var nonLeapLadder=[0,31,59,90,120,151,181,212,243,273,304,334],leapLadder=[0,31,60,91,121,152,182,213,244,274,305,335];function unitOutOfRange(unit,value){return new Invalid("unit out of range","you specified "+value+" (of type "+typeof value+") as a "+unit+", which is invalid");} function dayOfWeek(year,month,day){var js=new Date(Date.UTC(year,month-1,day)).getUTCDay();return js===0?7:js;} function computeOrdinal(year,month,day){return day+(isLeapYear(year)?leapLadder:nonLeapLadder)[month-1];} function uncomputeOrdinal(year,ordinal){var table=isLeapYear(year)?leapLadder:nonLeapLadder,month0=table.findIndex(function(i){return iweeksInWeekYear(year)){weekYear=year+1;weekNumber=1;}else{weekYear=year;} return Object.assign({weekYear:weekYear,weekNumber:weekNumber,weekday:weekday},timeObject(gregObj));} function weekToGregorian(weekData){var weekYear=weekData.weekYear,weekNumber=weekData.weekNumber,weekday=weekData.weekday,weekdayOfJan4=dayOfWeek(weekYear,1,4),yearInDays=daysInYear(weekYear);var ordinal=weekNumber*7+weekday-weekdayOfJan4-3,year;if(ordinal<1){year=weekYear-1;ordinal+=daysInYear(year);}else if(ordinal>yearInDays){year=weekYear+1;ordinal-=daysInYear(weekYear);}else{year=weekYear;} var _uncomputeOrdinal=uncomputeOrdinal(year,ordinal),month=_uncomputeOrdinal.month,day=_uncomputeOrdinal.day;return Object.assign({year:year,month:month,day:day},timeObject(weekData));} function gregorianToOrdinal(gregData){var year=gregData.year,month=gregData.month,day=gregData.day,ordinal=computeOrdinal(year,month,day);return Object.assign({year:year,ordinal:ordinal},timeObject(gregData));} function ordinalToGregorian(ordinalData){var year=ordinalData.year,ordinal=ordinalData.ordinal,_uncomputeOrdinal2=uncomputeOrdinal(year,ordinal),month=_uncomputeOrdinal2.month,day=_uncomputeOrdinal2.day;return Object.assign({year:year,month:month,day:day},timeObject(ordinalData));} function hasInvalidWeekData(obj){var validYear=isInteger(obj.weekYear),validWeek=integerBetween(obj.weekNumber,1,weeksInWeekYear(obj.weekYear)),validWeekday=integerBetween(obj.weekday,1,7);if(!validYear){return unitOutOfRange("weekYear",obj.weekYear);}else if(!validWeek){return unitOutOfRange("week",obj.week);}else if(!validWeekday){return unitOutOfRange("weekday",obj.weekday);}else return false;} function hasInvalidOrdinalData(obj){var validYear=isInteger(obj.year),validOrdinal=integerBetween(obj.ordinal,1,daysInYear(obj.year));if(!validYear){return unitOutOfRange("year",obj.year);}else if(!validOrdinal){return unitOutOfRange("ordinal",obj.ordinal);}else return false;} function hasInvalidGregorianData(obj){var validYear=isInteger(obj.year),validMonth=integerBetween(obj.month,1,12),validDay=integerBetween(obj.day,1,daysInMonth(obj.year,obj.month));if(!validYear){return unitOutOfRange("year",obj.year);}else if(!validMonth){return unitOutOfRange("month",obj.month);}else if(!validDay){return unitOutOfRange("day",obj.day);}else return false;} function hasInvalidTimeData(obj){var hour=obj.hour,minute=obj.minute,second=obj.second,millisecond=obj.millisecond;var validHour=integerBetween(hour,0,23)||hour===24&&minute===0&&second===0&&millisecond===0,validMinute=integerBetween(minute,0,59),validSecond=integerBetween(second,0,59),validMillisecond=integerBetween(millisecond,0,999);if(!validHour){return unitOutOfRange("hour",hour);}else if(!validMinute){return unitOutOfRange("minute",minute);}else if(!validSecond){return unitOutOfRange("second",second);}else if(!validMillisecond){return unitOutOfRange("millisecond",millisecond);}else return false;} var INVALID$2="Invalid DateTime";var MAX_DATE=8.64e15;function unsupportedZone(zone){return new Invalid("unsupported zone","the zone \""+zone.name+"\" is not supported");} function possiblyCachedWeekData(dt){if(dt.weekData===null){dt.weekData=gregorianToWeek(dt.c);} return dt.weekData;} function clone$1(inst,alts){var current={ts:inst.ts,zone:inst.zone,c:inst.c,o:inst.o,loc:inst.loc,invalid:inst.invalid};return new DateTime(Object.assign({},current,alts,{old:current}));} function fixOffset(localTS,o,tz){var utcGuess=localTS-o*60*1000;var o2=tz.offset(utcGuess);if(o===o2){return[utcGuess,o];} utcGuess-=(o2-o)*60*1000;var o3=tz.offset(utcGuess);if(o2===o3){return[utcGuess,o2];} return[localTS-Math.min(o2,o3)*60*1000,Math.max(o2,o3)];} function tsToObj(ts,offset){ts+=offset*60*1000;var d=new Date(ts);return{year:d.getUTCFullYear(),month:d.getUTCMonth()+1,day:d.getUTCDate(),hour:d.getUTCHours(),minute:d.getUTCMinutes(),second:d.getUTCSeconds(),millisecond:d.getUTCMilliseconds()};} function objToTS(obj,offset,zone){return fixOffset(objToLocalTS(obj),offset,zone);} function adjustTime(inst,dur){var oPre=inst.o,year=inst.c.year+Math.trunc(dur.years),month=inst.c.month+Math.trunc(dur.months)+Math.trunc(dur.quarters)*3,c=Object.assign({},inst.c,{year:year,month:month,day:Math.min(inst.c.day,daysInMonth(year,month))+Math.trunc(dur.days)+Math.trunc(dur.weeks)*7}),millisToAdd=Duration.fromObject({years:dur.years-Math.trunc(dur.years),quarters:dur.quarters-Math.trunc(dur.quarters),months:dur.months-Math.trunc(dur.months),weeks:dur.weeks-Math.trunc(dur.weeks),days:dur.days-Math.trunc(dur.days),hours:dur.hours,minutes:dur.minutes,seconds:dur.seconds,milliseconds:dur.milliseconds}).as("milliseconds"),localTS=objToLocalTS(c);var _fixOffset=fixOffset(localTS,oPre,inst.zone),ts=_fixOffset[0],o=_fixOffset[1];if(millisToAdd!==0){ts+=millisToAdd;o=inst.zone.offset(ts);} return{ts:ts,o:o};} function parseDataToDateTime(parsed,parsedZone,opts,format,text){var setZone=opts.setZone,zone=opts.zone;if(parsed&&Object.keys(parsed).length!==0){var interpretationZone=parsedZone||zone,inst=DateTime.fromObject(Object.assign(parsed,opts,{zone:interpretationZone,setZone:undefined}));return setZone?inst:inst.setZone(zone);}else{return DateTime.invalid(new Invalid("unparsable","the input \""+text+"\" can't be parsed as "+format));}} function toTechFormat(dt,format,allowZ){if(allowZ===void 0){allowZ=true;} return dt.isValid?Formatter.create(Locale.create("en-US"),{allowZ:allowZ,forceSimple:true}).formatDateTimeFromString(dt,format):null;} function toTechTimeFormat(dt,_ref){var _ref$suppressSeconds=_ref.suppressSeconds,suppressSeconds=_ref$suppressSeconds===void 0?false:_ref$suppressSeconds,_ref$suppressMillisec=_ref.suppressMilliseconds,suppressMilliseconds=_ref$suppressMillisec===void 0?false:_ref$suppressMillisec,includeOffset=_ref.includeOffset,_ref$includeZone=_ref.includeZone,includeZone=_ref$includeZone===void 0?false:_ref$includeZone,_ref$spaceZone=_ref.spaceZone,spaceZone=_ref$spaceZone===void 0?false:_ref$spaceZone,_ref$format=_ref.format,format=_ref$format===void 0?"extended":_ref$format;var fmt=format==="basic"?"HHmm":"HH:mm";if(!suppressSeconds||dt.second!==0||dt.millisecond!==0){fmt+=format==="basic"?"ss":":ss";if(!suppressMilliseconds||dt.millisecond!==0){fmt+=".SSS";}} if((includeZone||includeOffset)&&spaceZone){fmt+=" ";} if(includeZone){fmt+="z";}else if(includeOffset){fmt+=format==="basic"?"ZZZ":"ZZ";} return toTechFormat(dt,fmt);} var defaultUnitValues={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},defaultWeekUnitValues={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},defaultOrdinalUnitValues={ordinal:1,hour:0,minute:0,second:0,millisecond:0};var orderedUnits$1=["year","month","day","hour","minute","second","millisecond"],orderedWeekUnits=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],orderedOrdinalUnits=["year","ordinal","hour","minute","second","millisecond"];function normalizeUnit(unit){var normalized={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[unit.toLowerCase()];if(!normalized)throw new InvalidUnitError(unit);return normalized;} function quickDT(obj,zone){for(var _iterator=_createForOfIteratorHelperLoose(orderedUnits$1),_step;!(_step=_iterator()).done;){var u=_step.value;if(isUndefined(obj[u])){obj[u]=defaultUnitValues[u];}} var invalid=hasInvalidGregorianData(obj)||hasInvalidTimeData(obj);if(invalid){return DateTime.invalid(invalid);} var tsNow=Settings.now(),offsetProvis=zone.offset(tsNow),_objToTS=objToTS(obj,offsetProvis,zone),ts=_objToTS[0],o=_objToTS[1];return new DateTime({ts:ts,zone:zone,o:o});} function diffRelative(start,end,opts){var round=isUndefined(opts.round)?true:opts.round,format=function format(c,unit){c=roundTo(c,round||opts.calendary?0:2,true);var formatter=end.loc.clone(opts).relFormatter(opts);return formatter.format(c,unit);},differ=function differ(unit){if(opts.calendary){if(!end.hasSame(start,unit)){return end.startOf(unit).diff(start.startOf(unit),unit).get(unit);}else return 0;}else{return end.diff(start,unit).get(unit);}};if(opts.unit){return format(differ(opts.unit),opts.unit);} for(var _iterator2=_createForOfIteratorHelperLoose(opts.units),_step2;!(_step2=_iterator2()).done;){var unit=_step2.value;var count=differ(unit);if(Math.abs(count)>=1){return format(count,unit);}} return format(0,opts.units[opts.units.length-1]);} var DateTime=function(){function DateTime(config){var zone=config.zone||Settings.defaultZone;var invalid=config.invalid||(Number.isNaN(config.ts)?new Invalid("invalid input"):null)||(!zone.isValid?unsupportedZone(zone):null);this.ts=isUndefined(config.ts)?Settings.now():config.ts;var c=null,o=null;if(!invalid){var unchanged=config.old&&config.old.ts===this.ts&&config.old.zone.equals(zone);if(unchanged){var _ref2=[config.old.c,config.old.o];c=_ref2[0];o=_ref2[1];}else{var ot=zone.offset(this.ts);c=tsToObj(this.ts,ot);invalid=Number.isNaN(c.year)?new Invalid("invalid input"):null;c=invalid?null:c;o=invalid?null:ot;}} this._zone=zone;this.loc=config.loc||Locale.create();this.invalid=invalid;this.weekData=null;this.c=c;this.o=o;this.isLuxonDateTime=true;} DateTime.local=function local(year,month,day,hour,minute,second,millisecond){if(isUndefined(year)){return new DateTime({ts:Settings.now()});}else{return quickDT({year:year,month:month,day:day,hour:hour,minute:minute,second:second,millisecond:millisecond},Settings.defaultZone);}};DateTime.utc=function utc(year,month,day,hour,minute,second,millisecond){if(isUndefined(year)){return new DateTime({ts:Settings.now(),zone:FixedOffsetZone.utcInstance});}else{return quickDT({year:year,month:month,day:day,hour:hour,minute:minute,second:second,millisecond:millisecond},FixedOffsetZone.utcInstance);}};DateTime.fromJSDate=function fromJSDate(date,options){if(options===void 0){options={};} var ts=isDate(date)?date.valueOf():NaN;if(Number.isNaN(ts)){return DateTime.invalid("invalid input");} var zoneToUse=normalizeZone(options.zone,Settings.defaultZone);if(!zoneToUse.isValid){return DateTime.invalid(unsupportedZone(zoneToUse));} return new DateTime({ts:ts,zone:zoneToUse,loc:Locale.fromObject(options)});};DateTime.fromMillis=function fromMillis(milliseconds,options){if(options===void 0){options={};} if(!isNumber(milliseconds)){throw new InvalidArgumentError("fromMillis requires a numerical input, but received a "+typeof milliseconds+" with value "+milliseconds);}else if(milliseconds<-MAX_DATE||milliseconds>MAX_DATE){return DateTime.invalid("Timestamp out of range");}else{return new DateTime({ts:milliseconds,zone:normalizeZone(options.zone,Settings.defaultZone),loc:Locale.fromObject(options)});}};DateTime.fromSeconds=function fromSeconds(seconds,options){if(options===void 0){options={};} if(!isNumber(seconds)){throw new InvalidArgumentError("fromSeconds requires a numerical input");}else{return new DateTime({ts:seconds*1000,zone:normalizeZone(options.zone,Settings.defaultZone),loc:Locale.fromObject(options)});}};DateTime.fromObject=function fromObject(obj){var zoneToUse=normalizeZone(obj.zone,Settings.defaultZone);if(!zoneToUse.isValid){return DateTime.invalid(unsupportedZone(zoneToUse));} var tsNow=Settings.now(),offsetProvis=zoneToUse.offset(tsNow),normalized=normalizeObject(obj,normalizeUnit,["zone","locale","outputCalendar","numberingSystem"]),containsOrdinal=!isUndefined(normalized.ordinal),containsGregorYear=!isUndefined(normalized.year),containsGregorMD=!isUndefined(normalized.month)||!isUndefined(normalized.day),containsGregor=containsGregorYear||containsGregorMD,definiteWeekDef=normalized.weekYear||normalized.weekNumber,loc=Locale.fromObject(obj);if((containsGregor||containsOrdinal)&&definiteWeekDef){throw new ConflictingSpecificationError("Can't mix weekYear/weekNumber units with year/month/day or ordinals");} if(containsGregorMD&&containsOrdinal){throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");} var useWeekData=definiteWeekDef||normalized.weekday&&!containsGregor;var units,defaultValues,objNow=tsToObj(tsNow,offsetProvis);if(useWeekData){units=orderedWeekUnits;defaultValues=defaultWeekUnitValues;objNow=gregorianToWeek(objNow);}else if(containsOrdinal){units=orderedOrdinalUnits;defaultValues=defaultOrdinalUnitValues;objNow=gregorianToOrdinal(objNow);}else{units=orderedUnits$1;defaultValues=defaultUnitValues;} var foundFirst=false;for(var _iterator3=_createForOfIteratorHelperLoose(units),_step3;!(_step3=_iterator3()).done;){var u=_step3.value;var v=normalized[u];if(!isUndefined(v)){foundFirst=true;}else if(foundFirst){normalized[u]=defaultValues[u];}else{normalized[u]=objNow[u];}} var higherOrderInvalid=useWeekData?hasInvalidWeekData(normalized):containsOrdinal?hasInvalidOrdinalData(normalized):hasInvalidGregorianData(normalized),invalid=higherOrderInvalid||hasInvalidTimeData(normalized);if(invalid){return DateTime.invalid(invalid);} var gregorian=useWeekData?weekToGregorian(normalized):containsOrdinal?ordinalToGregorian(normalized):normalized,_objToTS2=objToTS(gregorian,offsetProvis,zoneToUse),tsFinal=_objToTS2[0],offsetFinal=_objToTS2[1],inst=new DateTime({ts:tsFinal,zone:zoneToUse,o:offsetFinal,loc:loc});if(normalized.weekday&&containsGregor&&obj.weekday!==inst.weekday){return DateTime.invalid("mismatched weekday","you can't specify both a weekday of "+normalized.weekday+" and a date of "+inst.toISO());} return inst;};DateTime.fromISO=function fromISO(text,opts){if(opts===void 0){opts={};} var _parseISODate=parseISODate(text),vals=_parseISODate[0],parsedZone=_parseISODate[1];return parseDataToDateTime(vals,parsedZone,opts,"ISO 8601",text);};DateTime.fromRFC2822=function fromRFC2822(text,opts){if(opts===void 0){opts={};} var _parseRFC2822Date=parseRFC2822Date(text),vals=_parseRFC2822Date[0],parsedZone=_parseRFC2822Date[1];return parseDataToDateTime(vals,parsedZone,opts,"RFC 2822",text);};DateTime.fromHTTP=function fromHTTP(text,opts){if(opts===void 0){opts={};} var _parseHTTPDate=parseHTTPDate(text),vals=_parseHTTPDate[0],parsedZone=_parseHTTPDate[1];return parseDataToDateTime(vals,parsedZone,opts,"HTTP",opts);};DateTime.fromFormat=function fromFormat(text,fmt,opts){if(opts===void 0){opts={};} if(isUndefined(text)||isUndefined(fmt)){throw new InvalidArgumentError("fromFormat requires an input string and a format");} var _opts=opts,_opts$locale=_opts.locale,locale=_opts$locale===void 0?null:_opts$locale,_opts$numberingSystem=_opts.numberingSystem,numberingSystem=_opts$numberingSystem===void 0?null:_opts$numberingSystem,localeToUse=Locale.fromOpts({locale:locale,numberingSystem:numberingSystem,defaultToEN:true}),_parseFromTokens=parseFromTokens(localeToUse,text,fmt),vals=_parseFromTokens[0],parsedZone=_parseFromTokens[1],invalid=_parseFromTokens[2];if(invalid){return DateTime.invalid(invalid);}else{return parseDataToDateTime(vals,parsedZone,opts,"format "+fmt,text);}};DateTime.fromString=function fromString(text,fmt,opts){if(opts===void 0){opts={};} return DateTime.fromFormat(text,fmt,opts);};DateTime.fromSQL=function fromSQL(text,opts){if(opts===void 0){opts={};} var _parseSQL=parseSQL(text),vals=_parseSQL[0],parsedZone=_parseSQL[1];return parseDataToDateTime(vals,parsedZone,opts,"SQL",text);};DateTime.invalid=function invalid(reason,explanation){if(explanation===void 0){explanation=null;} if(!reason){throw new InvalidArgumentError("need to specify a reason the DateTime is invalid");} var invalid=reason instanceof Invalid?reason:new Invalid(reason,explanation);if(Settings.throwOnInvalid){throw new InvalidDateTimeError(invalid);}else{return new DateTime({invalid:invalid});}};DateTime.isDateTime=function isDateTime(o){return o&&o.isLuxonDateTime||false;};var _proto=DateTime.prototype;_proto.get=function get(unit){return this[unit];};_proto.resolvedLocaleOpts=function resolvedLocaleOpts(opts){if(opts===void 0){opts={};} var _Formatter$create$res=Formatter.create(this.loc.clone(opts),opts).resolvedOptions(this),locale=_Formatter$create$res.locale,numberingSystem=_Formatter$create$res.numberingSystem,calendar=_Formatter$create$res.calendar;return{locale:locale,numberingSystem:numberingSystem,outputCalendar:calendar};};_proto.toUTC=function toUTC(offset,opts){if(offset===void 0){offset=0;} if(opts===void 0){opts={};} return this.setZone(FixedOffsetZone.instance(offset),opts);};_proto.toLocal=function toLocal(){return this.setZone(Settings.defaultZone);};_proto.setZone=function setZone(zone,_temp){var _ref3=_temp===void 0?{}:_temp,_ref3$keepLocalTime=_ref3.keepLocalTime,keepLocalTime=_ref3$keepLocalTime===void 0?false:_ref3$keepLocalTime,_ref3$keepCalendarTim=_ref3.keepCalendarTime,keepCalendarTime=_ref3$keepCalendarTim===void 0?false:_ref3$keepCalendarTim;zone=normalizeZone(zone,Settings.defaultZone);if(zone.equals(this.zone)){return this;}else if(!zone.isValid){return DateTime.invalid(unsupportedZone(zone));}else{var newTS=this.ts;if(keepLocalTime||keepCalendarTime){var offsetGuess=zone.offset(this.ts);var asObj=this.toObject();var _objToTS3=objToTS(asObj,offsetGuess,zone);newTS=_objToTS3[0];} return clone$1(this,{ts:newTS,zone:zone});}};_proto.reconfigure=function reconfigure(_temp2){var _ref4=_temp2===void 0?{}:_temp2,locale=_ref4.locale,numberingSystem=_ref4.numberingSystem,outputCalendar=_ref4.outputCalendar;var loc=this.loc.clone({locale:locale,numberingSystem:numberingSystem,outputCalendar:outputCalendar});return clone$1(this,{loc:loc});};_proto.setLocale=function setLocale(locale){return this.reconfigure({locale:locale});};_proto.set=function set(values){if(!this.isValid)return this;var normalized=normalizeObject(values,normalizeUnit,[]),settingWeekStuff=!isUndefined(normalized.weekYear)||!isUndefined(normalized.weekNumber)||!isUndefined(normalized.weekday);var mixed;if(settingWeekStuff){mixed=weekToGregorian(Object.assign(gregorianToWeek(this.c),normalized));}else if(!isUndefined(normalized.ordinal)){mixed=ordinalToGregorian(Object.assign(gregorianToOrdinal(this.c),normalized));}else{mixed=Object.assign(this.toObject(),normalized);if(isUndefined(normalized.day)){mixed.day=Math.min(daysInMonth(mixed.year,mixed.month),mixed.day);}} var _objToTS4=objToTS(mixed,this.o,this.zone),ts=_objToTS4[0],o=_objToTS4[1];return clone$1(this,{ts:ts,o:o});};_proto.plus=function plus(duration){if(!this.isValid)return this;var dur=friendlyDuration(duration);return clone$1(this,adjustTime(this,dur));};_proto.minus=function minus(duration){if(!this.isValid)return this;var dur=friendlyDuration(duration).negate();return clone$1(this,adjustTime(this,dur));};_proto.startOf=function startOf(unit){if(!this.isValid)return this;var o={},normalizedUnit=Duration.normalizeUnit(unit);switch(normalizedUnit){case"years":o.month=1;case"quarters":case"months":o.day=1;case"weeks":case"days":o.hour=0;case"hours":o.minute=0;case"minutes":o.second=0;case"seconds":o.millisecond=0;break;} if(normalizedUnit==="weeks"){o.weekday=1;} if(normalizedUnit==="quarters"){var q=Math.ceil(this.month/3);o.month=(q-1)*3+1;} return this.set(o);};_proto.endOf=function endOf(unit){var _this$plus;return this.isValid?this.plus((_this$plus={},_this$plus[unit]=1,_this$plus)).startOf(unit).minus(1):this;};_proto.toFormat=function toFormat(fmt,opts){if(opts===void 0){opts={};} return this.isValid?Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this,fmt):INVALID$2;};_proto.toLocaleString=function toLocaleString(opts){if(opts===void 0){opts=DATE_SHORT;} return this.isValid?Formatter.create(this.loc.clone(opts),opts).formatDateTime(this):INVALID$2;};_proto.toLocaleParts=function toLocaleParts(opts){if(opts===void 0){opts={};} return this.isValid?Formatter.create(this.loc.clone(opts),opts).formatDateTimeParts(this):[];};_proto.toISO=function toISO(opts){if(opts===void 0){opts={};} if(!this.isValid){return null;} return this.toISODate(opts)+"T"+this.toISOTime(opts);};_proto.toISODate=function toISODate(_temp3){var _ref5=_temp3===void 0?{}:_temp3,_ref5$format=_ref5.format,format=_ref5$format===void 0?"extended":_ref5$format;var fmt=format==="basic"?"yyyyMMdd":"yyyy-MM-dd";if(this.year>9999){fmt="+"+fmt;} return toTechFormat(this,fmt);};_proto.toISOWeekDate=function toISOWeekDate(){return toTechFormat(this,"kkkk-'W'WW-c");};_proto.toISOTime=function toISOTime(_temp4){var _ref6=_temp4===void 0?{}:_temp4,_ref6$suppressMillise=_ref6.suppressMilliseconds,suppressMilliseconds=_ref6$suppressMillise===void 0?false:_ref6$suppressMillise,_ref6$suppressSeconds=_ref6.suppressSeconds,suppressSeconds=_ref6$suppressSeconds===void 0?false:_ref6$suppressSeconds,_ref6$includeOffset=_ref6.includeOffset,includeOffset=_ref6$includeOffset===void 0?true:_ref6$includeOffset,_ref6$format=_ref6.format,format=_ref6$format===void 0?"extended":_ref6$format;return toTechTimeFormat(this,{suppressSeconds:suppressSeconds,suppressMilliseconds:suppressMilliseconds,includeOffset:includeOffset,format:format});};_proto.toRFC2822=function toRFC2822(){return toTechFormat(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",false);};_proto.toHTTP=function toHTTP(){return toTechFormat(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'");};_proto.toSQLDate=function toSQLDate(){return toTechFormat(this,"yyyy-MM-dd");};_proto.toSQLTime=function toSQLTime(_temp5){var _ref7=_temp5===void 0?{}:_temp5,_ref7$includeOffset=_ref7.includeOffset,includeOffset=_ref7$includeOffset===void 0?true:_ref7$includeOffset,_ref7$includeZone=_ref7.includeZone,includeZone=_ref7$includeZone===void 0?false:_ref7$includeZone;return toTechTimeFormat(this,{includeOffset:includeOffset,includeZone:includeZone,spaceZone:true});};_proto.toSQL=function toSQL(opts){if(opts===void 0){opts={};} if(!this.isValid){return null;} return this.toSQLDate()+" "+this.toSQLTime(opts);};_proto.toString=function toString(){return this.isValid?this.toISO():INVALID$2;};_proto.valueOf=function valueOf(){return this.toMillis();};_proto.toMillis=function toMillis(){return this.isValid?this.ts:NaN;};_proto.toSeconds=function toSeconds(){return this.isValid?this.ts/1000:NaN;};_proto.toJSON=function toJSON(){return this.toISO();};_proto.toBSON=function toBSON(){return this.toJSDate();};_proto.toObject=function toObject(opts){if(opts===void 0){opts={};} if(!this.isValid)return{};var base=Object.assign({},this.c);if(opts.includeConfig){base.outputCalendar=this.outputCalendar;base.numberingSystem=this.loc.numberingSystem;base.locale=this.loc.locale;} return base;};_proto.toJSDate=function toJSDate(){return new Date(this.isValid?this.ts:NaN);};_proto.diff=function diff(otherDateTime,unit,opts){if(unit===void 0){unit="milliseconds";} if(opts===void 0){opts={};} if(!this.isValid||!otherDateTime.isValid){return Duration.invalid(this.invalid||otherDateTime.invalid,"created by diffing an invalid DateTime");} var durOpts=Object.assign({locale:this.locale,numberingSystem:this.numberingSystem},opts);var units=maybeArray(unit).map(Duration.normalizeUnit),otherIsLater=otherDateTime.valueOf()>this.valueOf(),earlier=otherIsLater?this:otherDateTime,later=otherIsLater?otherDateTime:this,diffed=_diff(earlier,later,units,durOpts);return otherIsLater?diffed.negate():diffed;};_proto.diffNow=function diffNow(unit,opts){if(unit===void 0){unit="milliseconds";} if(opts===void 0){opts={};} return this.diff(DateTime.local(),unit,opts);};_proto.until=function until(otherDateTime){return this.isValid?Interval.fromDateTimes(this,otherDateTime):this;};_proto.hasSame=function hasSame(otherDateTime,unit){if(!this.isValid)return false;if(unit==="millisecond"){return this.valueOf()===otherDateTime.valueOf();}else{var inputMs=otherDateTime.valueOf();return this.startOf(unit)<=inputMs&&inputMs<=this.endOf(unit);}};_proto.equals=function equals(other){return this.isValid&&other.isValid&&this.valueOf()===other.valueOf()&&this.zone.equals(other.zone)&&this.loc.equals(other.loc);};_proto.toRelative=function toRelative(options){if(options===void 0){options={};} if(!this.isValid)return null;var base=options.base||DateTime.fromObject({zone:this.zone}),padding=options.padding?thisthis.set({month:1}).offset||this.offset>this.set({month:5}).offset;}}},{key:"isInLeapYear",get:function get(){return isLeapYear(this.year);}},{key:"daysInMonth",get:function get(){return daysInMonth(this.year,this.month);}},{key:"daysInYear",get:function get(){return this.isValid?daysInYear(this.year):NaN;}},{key:"weeksInWeekYear",get:function get(){return this.isValid?weeksInWeekYear(this.weekYear):NaN;}}],[{key:"DATE_SHORT",get:function get(){return DATE_SHORT;}},{key:"DATE_MED",get:function get(){return DATE_MED;}},{key:"DATE_MED_WITH_WEEKDAY",get:function get(){return DATE_MED_WITH_WEEKDAY;}},{key:"DATE_FULL",get:function get(){return DATE_FULL;}},{key:"DATE_HUGE",get:function get(){return DATE_HUGE;}},{key:"TIME_SIMPLE",get:function get(){return TIME_SIMPLE;}},{key:"TIME_WITH_SECONDS",get:function get(){return TIME_WITH_SECONDS;}},{key:"TIME_WITH_SHORT_OFFSET",get:function get(){return TIME_WITH_SHORT_OFFSET;}},{key:"TIME_WITH_LONG_OFFSET",get:function get(){return TIME_WITH_LONG_OFFSET;}},{key:"TIME_24_SIMPLE",get:function get(){return TIME_24_SIMPLE;}},{key:"TIME_24_WITH_SECONDS",get:function get(){return TIME_24_WITH_SECONDS;}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function get(){return TIME_24_WITH_SHORT_OFFSET;}},{key:"TIME_24_WITH_LONG_OFFSET",get:function get(){return TIME_24_WITH_LONG_OFFSET;}},{key:"DATETIME_SHORT",get:function get(){return DATETIME_SHORT;}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function get(){return DATETIME_SHORT_WITH_SECONDS;}},{key:"DATETIME_MED",get:function get(){return DATETIME_MED;}},{key:"DATETIME_MED_WITH_SECONDS",get:function get(){return DATETIME_MED_WITH_SECONDS;}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function get(){return DATETIME_MED_WITH_WEEKDAY;}},{key:"DATETIME_FULL",get:function get(){return DATETIME_FULL;}},{key:"DATETIME_FULL_WITH_SECONDS",get:function get(){return DATETIME_FULL_WITH_SECONDS;}},{key:"DATETIME_HUGE",get:function get(){return DATETIME_HUGE;}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function get(){return DATETIME_HUGE_WITH_SECONDS;}}]);return DateTime;}();function friendlyDateTime(dateTimeish){if(DateTime.isDateTime(dateTimeish)){return dateTimeish;}else if(dateTimeish&&dateTimeish.valueOf&&isNumber(dateTimeish.valueOf())){return DateTime.fromJSDate(dateTimeish);}else if(dateTimeish&&typeof dateTimeish==="object"){return DateTime.fromObject(dateTimeish);}else{throw new InvalidArgumentError("Unknown datetime argument: "+dateTimeish+", of type "+typeof dateTimeish);}} exports.DateTime=DateTime;exports.Duration=Duration;exports.FixedOffsetZone=FixedOffsetZone;exports.IANAZone=IANAZone;exports.Info=Info;exports.Interval=Interval;exports.InvalidZone=InvalidZone;exports.LocalZone=LocalZone;exports.Settings=Settings;exports.Zone=Zone;return exports;}({}));; /* /web/static/src/env.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/env',async function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");__exports.makeEnv=makeEnv;function makeEnv(){return{qweb:new owl.QWeb(),bus:new owl.core.EventBus(),services:{},debug:odoo.debug,_t:()=>{throw new Error("Translations are not ready yet. Maybe use _lt instead?");},get isSmall(){throw new Error("UI service not initialized!");},};} const serviceRegistry=registry.category("services");const SERVICES_METADATA=__exports.SERVICES_METADATA={};__exports.startServices=startServices;async function startServices(env){const toStart=new Set();serviceRegistry.on("UPDATE",null,async(payload)=>{await Promise.resolve();const{operation,key:name,value:service}=payload;if(operation==="delete"){return;} if(toStart.size){const namedService=Object.assign(Object.create(service),{name});toStart.add(namedService);}else{await _startServices(env,toStart);}});await Promise.resolve();await _startServices(env,toStart);} async function _startServices(env,toStart){const services=env.services;for(const[name,service]of serviceRegistry.getEntries()){if(!(name in services)){const namedService=Object.assign(Object.create(service),{name});toStart.add(namedService);}} async function start(){let service=null;const proms=[];while((service=findNext())){let name=service.name;toStart.delete(service);const entries=(service.dependencies||[]).map((dep)=>[dep,services[dep]]);const dependencies=Object.fromEntries(entries);let value;try{value=service.start(env,dependencies);}catch(e){value=e;console.error(e);} if("async"in service){SERVICES_METADATA[name]=service.async;} if(value instanceof Promise){proms.push(new Promise(async(resolve)=>{value.then((val)=>{services[name]=val||null;}).catch((error)=>{services[name]=error;console.error(error);}).finally(resolve);}));}else{services[service.name]=value||null;}} await Promise.all(proms);if(proms.length){return start();}} await start();if(toStart.size){const names=[...toStart].map((s)=>s.name);const missingDeps=new Set();[...toStart].forEach((s)=>s.dependencies.forEach((dep)=>{if(!(dep in services)&&!names.includes(dep)){missingDeps.add(dep);}}));const depNames=[...missingDeps].join(", ");throw new Error(`Some services could not be started: ${names}. Missing dependencies: ${depNames}`);} function findNext(){for(let s of toStart){if(s.dependencies){if(s.dependencies.every((d)=>d in services)){return s;}}else{return s;}} return null;}} return __exports;});; /* /web/static/src/core/assets.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/assets',async function(require){'use strict';let __exports={};const{useEnv,onWillStart}=owl.hooks;const{memoize}=require("@web/core/utils/functions");const{browser}=require("@web/core/browser/browser");class AssetsLoadingError extends Error{} const loadJS=memoize(function loadJS(url){if(document.querySelector(`script[src="${url}"]`)){return Promise.resolve();} const scriptEl=document.createElement("script");scriptEl.type="text/javascript";scriptEl.src=url;document.head.appendChild(scriptEl);return new Promise((resolve,reject)=>{scriptEl.addEventListener("load",resolve);scriptEl.addEventListener("error",()=>{reject(new AssetsLoadingError(`The loading of ${url} failed`));});});});const loadCSS=memoize(function loadCSS(url){if(document.querySelector(`link[href="${url}"]`)){return Promise.resolve();} const linkEl=document.createElement("link");linkEl.type="text/css";linkEl.rel="stylesheet";linkEl.href=url;document.head.appendChild(linkEl);return new Promise(function(resolve,reject){linkEl.addEventListener("load",resolve);linkEl.addEventListener("error",()=>{reject(new AssetsLoadingError(`The loading of ${url} failed`));});});});const loadBundleTemplates=__exports.loadBundleTemplates=memoize(async function loadBundleTemplates(name){const bundleURL=`/web/webclient/qweb/${Date.now()}?bundle=${name}`;const templates=await(await browser.fetch(bundleURL)).text();return processTemplates(templates);});const bundlesCache={};async function loadBundle(name,options){const{templates}=options;if(!bundlesCache[name]){bundlesCache[name]={name};} if(templates&&!bundlesCache[name].templates){bundlesCache[name].templates=loadBundleTemplates(name);} const entries=await Promise.all(Object.keys(options).map(async(key)=>[key,await bundlesCache[name][key]]));return Object.fromEntries(entries);} __exports.processTemplates=processTemplates;function processTemplates(templates){const doc=new DOMParser().parseFromString(templates,"text/xml");for(const template of[...doc.querySelector("templates").children]){if(template.hasAttribute("owl")){template.removeAttribute("owl");}else{template.remove();}} return doc;} const loadPublicAsset=__exports.loadPublicAsset=memoize(async function loadPublicAsset(xmlid,orm){const xml=await orm.call("ir.ui.view","render_public_asset",[xmlid]);const doc=new DOMParser().parseFromString(`${xml}`,"text/xml");return loadAssets({cssLibs:[...doc.querySelectorAll("link[href]")].map((node)=>node.getAttribute("href")),jsLibs:[...doc.querySelectorAll("script[src]")].map((node)=>node.getAttribute("src")),});});__exports.loadAssets=loadAssets;async function loadAssets(assets){const proms=[];const loadedAssets={};if("bundles"in assets){const bundles=Object.entries(assets.bundles);const bundlesProm=Promise.all(bundles.map(async([name,options])=>[name,await loadBundle(name,options)])).then((loadedBundles)=>{loadedAssets.bundles=Object.fromEntries(loadedBundles);});proms.push(bundlesProm);} if("jsLibs"in assets){proms.push(Promise.all(assets.jsLibs.map(loadJS)));} if("cssLibs"in assets){proms.push(Promise.all(assets.cssLibs.map(loadCSS)));} await Promise.all(proms);return loadedAssets;} __exports.useAssets=useAssets;function useAssets(assets){const env=useEnv();onWillStart(async()=>{const loadedAssets=await loadAssets(assets);const{bundles}=loadedAssets;if(bundles){const templateDocs=Object.values(bundles).map(({templates})=>templates);for(const xmlDoc of templateDocs){for(const template of[...xmlDoc.querySelector("templates").children]){if(template.getAttribute("t-name")in env.qweb.templates){template.remove();}} env.qweb.addTemplates(xmlDoc);}}});} return __exports;});; /* /web/static/src/core/browser/browser.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/browser/browser',async function(require){'use strict';let __exports={};let sessionStorage=window.sessionStorage;let localStorage=owl.browser.localStorage;try{localStorage.setItem("__localStorage__","true");localStorage.removeItem("__localStorage__");}catch(e){localStorage=makeRAMLocalStorage();sessionStorage=makeRAMLocalStorage();} const browser=__exports.browser=Object.assign({},owl.browser,{addEventListener:window.addEventListener.bind(window),removeEventListener:window.removeEventListener.bind(window),requestAnimationFrame:window.requestAnimationFrame.bind(window),cancelAnimationFrame:window.cancelAnimationFrame.bind(window),console:window.console,history:window.history,navigator:navigator,open:window.open.bind(window),XMLHttpRequest:window.XMLHttpRequest,localStorage,sessionStorage,});Object.defineProperty(browser,"location",{set(val){window.location=val;},get(){return window.location;},configurable:true,});__exports.makeRAMLocalStorage=makeRAMLocalStorage;function makeRAMLocalStorage(){let store={};return{setItem(key,value){store[key]=value;},getItem(key){return store[key];},clear(){store={};},removeItem(key){delete store[key];},get length(){return Object.keys(store).length;},key(){return"";},};} return __exports;});; /* /web/static/src/core/browser/cookie_service.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/browser/cookie_service',async function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const COOKIE_TTL=24*60*60*365;function parseCookieString(str){const cookie={};const parts=str.split("; ");for(let part of parts){const[key,value]=part.split("=");cookie[key]=value||"";} return cookie;} function cookieToString(key,value,ttl=COOKIE_TTL){let fullCookie=[];if(value!==undefined){fullCookie.push(`${key}=${value}`);} fullCookie=fullCookie.concat(["path=/",`max-age=${ttl}`]);return fullCookie.join(";");} function makeCookieService(){function getCurrent(){return parseCookieString(document.cookie);} let cookie=getCurrent();function setCookie(key,value,ttl){document.cookie=cookieToString(key,value,ttl);cookie=getCurrent();} return{get current(){return cookie;},setCookie,deleteCookie(key){setCookie(key,"kill",0);},};} const cookieService=__exports.cookieService={start(){return makeCookieService();},};registry.category("services").add("cookie",cookieService);return __exports;});; /* /web/static/src/core/browser/feature_detection.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/browser/feature_detection',async function(require){'use strict';let __exports={};const{browser}=require("@web/core/browser/browser");__exports.isBrowserChrome=isBrowserChrome;function isBrowserChrome(){return browser.navigator.userAgent.includes("Chrome");} __exports.isAndroid=isAndroid;function isAndroid(){return/Android/i.test(browser.navigator.userAgent);} __exports.isIOS=isIOS;function isIOS(){return/(iPad|iPhone|iPod)/i.test(browser.navigator.userAgent)||(browser.navigator.platform==='MacIntel'&&maxTouchPoints()>1);} __exports.isOtherMobileOS=isOtherMobileOS;function isOtherMobileOS(){return/(webOS|BlackBerry|Windows Phone)/i.test(browser.navigator.userAgent);} __exports.isMacOS=isMacOS;function isMacOS(){return Boolean(browser.navigator.userAgent.match(/Mac/i));} __exports.isMobileOS=isMobileOS;function isMobileOS(){return isAndroid()||isIOS()||isOtherMobileOS();} __exports.isIosApp=isIosApp;function isIosApp(){return/OdooMobile \(iOS\)/i.test(browser.navigator.userAgent);} __exports.hasTouch=hasTouch;function hasTouch(){return"ontouchstart"in window||"onmsgesturechange"in window;} __exports.maxTouchPoints=maxTouchPoints;function maxTouchPoints(){return browser.navigator.maxTouchPoints||1;} return __exports;});; /* /web/static/src/core/browser/router_service.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/browser/router_service',async function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{shallowEqual}=require("@web/core/utils/objects");const{objectToUrlEncodedString}=require("@web/core/utils/urls");const{browser}=require("@web/core/browser/browser");function cast(value){return!value||isNaN(value)?value:Number(value);} function parseString(str){const parts=str.split("&");const result={};for(let part of parts){const[key,value]=part.split("=");const decoded=decodeURIComponent(value||"");result[key]=cast(decoded);} return result;} function applyLocking(lockedKeys,hash,currentHash,options={}){const newHash={};for(const key in hash){if("lock"in options){options.lock?lockedKeys.add(key):lockedKeys.delete(key);}else if(lockedKeys.has(key)){continue;} newHash[key]=hash[key];} for(const key in currentHash){if(lockedKeys.has(key)&&!(key in newHash)){newHash[key]=currentHash[key];}} return newHash;} function computeNewRoute(hash,replace,currentRoute){if(!replace){hash=Object.assign({},currentRoute.hash,hash);} hash=sanitizeHash(hash);if(!shallowEqual(currentRoute.hash,hash)){return Object.assign({},currentRoute,{hash});} return false;} function sanitizeHash(hash){return Object.fromEntries(Object.entries(hash).filter(([,v])=>v!==undefined).map(([k,v])=>[k,cast(v)]));} __exports.parseHash=parseHash;function parseHash(hash){return hash&&hash!=="#"?parseString(hash.slice(1)):{};} __exports.parseSearchQuery=parseSearchQuery;function parseSearchQuery(search){return search?parseString(search.slice(1)):{};} __exports.routeToUrl=routeToUrl;function routeToUrl(route){const search=objectToUrlEncodedString(route.search);const hash=objectToUrlEncodedString(route.hash);return route.pathname+(search?"?"+search:"")+(hash?"#"+hash:"");} async function redirect(env,url,wait=false){if(wait){await new Promise((resolve)=>{const waitForServer=(delay)=>{browser.setTimeout(async()=>{env.services.rpc("/web/webclient/version_info",{}).then(resolve).catch(()=>waitForServer(250));},delay);};waitForServer(1000);});} browser.location.assign(url);} function getRoute(urlObj){const{pathname,search,hash}=urlObj;const searchQuery=parseSearchQuery(search);const hashQuery=parseHash(hash);return{pathname,search:searchQuery,hash:hashQuery};} function makeRouter(env){const bus=env.bus;const lockedKeys=new Set();let current=getRoute(browser.location);let pushTimeout;browser.addEventListener("hashchange",(ev)=>{browser.clearTimeout(pushTimeout);const loc=new URL(ev.newURL);current=getRoute(loc);bus.trigger("ROUTE_CHANGE");});function makeDebouncedPush(mode){let allPushArgs=[];function doPush(){const replace=allPushArgs.some(([,options])=>options&&options.replace);const newHash=allPushArgs.reduce((finalHash,[hash,options])=>{hash=applyLocking(lockedKeys,hash,current.hash,options);if(finalHash){hash=applyLocking(lockedKeys,hash,finalHash,options);} return Object.assign(finalHash||{},hash);},null);const newRoute=computeNewRoute(newHash,replace,current);if(!newRoute){return;} const url=browser.location.origin+routeToUrl(newRoute);if(mode==="push"){browser.history.pushState({},"",url);}else{browser.history.replaceState({},"",url);} current=getRoute(browser.location);} return function pushOrReplaceState(hash,options){allPushArgs.push([hash,options]);browser.clearTimeout(pushTimeout);pushTimeout=browser.setTimeout(()=>{doPush();pushTimeout=null;allPushArgs=[];});};} return{get current(){return current;},pushState:makeDebouncedPush("push"),replaceState:makeDebouncedPush("replace"),redirect:(url,wait)=>redirect(env,url,wait),cancelPushes:()=>browser.clearTimeout(pushTimeout),};} const routerService=__exports.routerService={start(env){return makeRouter(env);},};__exports.objectToQuery=objectToQuery;function objectToQuery(obj){const query={};Object.entries(obj).forEach(([k,v])=>{query[k]=v?String(v):v;});return query;} registry.category("services").add("router",routerService);return __exports;});; /* /web/static/src/core/browser/title_service.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/browser/title_service',async function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const titleService=__exports.titleService={start(){const titleParts={};function getParts(){return Object.assign({},titleParts);} function setParts(parts){for(const key in parts){const val=parts[key];if(!val){delete titleParts[key];}else{titleParts[key]=val;}} document.title=Object.values(titleParts).join(" - ");} return{get current(){return document.title;},getParts,setParts,};},};registry.category("services").add("title",titleService);return __exports;});; /* /web/static/src/core/checkbox/checkbox.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/checkbox/checkbox',async function(require){'use strict';let __exports={};const{Component,QWeb}=owl;const CheckBox=__exports.CheckBox=class CheckBox extends Component{setup(){this.id=`checkbox-comp-${CheckBox.nextId++}`;}} CheckBox.template="web.CheckBox";CheckBox.nextId=1;QWeb.registerComponent("CheckBox",CheckBox);return __exports;});; /* /web/static/src/core/confirmation_dialog/confirmation_dialog.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/confirmation_dialog/confirmation_dialog',async function(require){'use strict';let __exports={};const{Dialog}=require("@web/core/dialog/dialog");const{_lt}=require("@web/core/l10n/translation");const ConfirmationDialog=__exports.ConfirmationDialog=class ConfirmationDialog extends Dialog{setup(){super.setup();this.title=this.props.title;} _cancel(){if(this.props.cancel){this.props.cancel();} this.close();} _confirm(){if(this.props.confirm){this.props.confirm();} this.close();}} ConfirmationDialog.props={title:{validate:(m)=>{return(typeof m==="string"||(typeof m==="object"&&typeof m.toString==="function"));},},body:String,confirm:{type:Function,optional:true},cancel:{type:Function,optional:true},close:Function,};ConfirmationDialog.defaultProps={title:_lt("Confirmation"),};ConfirmationDialog.bodyTemplate="web.ConfirmationDialogBody";ConfirmationDialog.footerTemplate="web.ConfirmationDialogFooter";ConfirmationDialog.size="modal-md";const AlertDialog=__exports.AlertDialog=class AlertDialog extends ConfirmationDialog{setup(){super.setup();if("contentClass"in this.props){this.contentClass=this.props.contentClass;}}} AlertDialog.size="modal-sm";AlertDialog.props=Object.assign(Object.create(ConfirmationDialog.props),{contentClass:{type:String,optional:true},});AlertDialog.defaultProps={title:_lt("Alert"),};return __exports;});; /* /web/static/src/core/context.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/context',async function(require){'use strict';let __exports={};const{evaluateExpr}=require("@web/core/py_js/py");__exports.makeContext=makeContext;function makeContext(contexts,initialEvaluationContext){const evaluationContext=Object.assign({},initialEvaluationContext);const context={};for(let ctx of contexts){if(ctx!==""){ctx=typeof ctx==="string"?evaluateExpr(ctx,evaluationContext):ctx;Object.assign(context,ctx);Object.assign(evaluationContext,context);}} return context;} return __exports;});; /* /web/static/src/core/datepicker/datepicker.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/datepicker/datepicker',async function(require){'use strict';let __exports={};const{localization}=require("@web/core/l10n/localization");const{registry}=require("@web/core/registry");const{useAutofocus}=require("@web/core/utils/hooks");const{Component,hooks}=owl;const{DateTime}=luxon;const{useExternalListener,useRef,useState}=hooks;const formatters=registry.category("formatters");const parsers=registry.category("parsers");let datePickerId=0;const luxonDateToMomentDate=(date)=>{return window.moment(String(date));};const luxonFormatToMomentFormat=(format)=>{return format.replace(/[dy]/g,(x)=>x.toUpperCase());};const isValidStaticFormat=(format)=>{try{return/^[\d\s/:-]+$/.test(DateTime.local().toFormat(format));}catch(_err){return false;}};const DatePicker=__exports.DatePicker=class DatePicker extends Component{setup(){this.inputRef=useRef("input");this.state=useState({warning:false});this.datePickerId=`o_datepicker_${datePickerId++}`;this.datePickerShown=false;this.initFormat();this.setDate(this.props);this.setFormat(this.props);useAutofocus();useExternalListener(window,"scroll",this.onWindowScroll);} mounted(){this.bootstrapDateTimePicker(this.props);this.updateInput();window.$(this.el).on("show.datetimepicker",()=>{this.datePickerShown=true;this.inputRef.el.select();});window.$(this.el).on("hide.datetimepicker",()=>{this.datePickerShown=false;this.onDateChange({useStatic:true});});window.$(this.el).on("error.datetimepicker",()=>false);} willUpdateProps(nextProps){const pickerParams={};let shouldUpdateInput=false;for(const prop in nextProps){const prev=this.props[prop];const next=nextProps[prop];if((prev instanceof DateTime&&!prev.equals(next))||prev!==next){pickerParams[prop]=nextProps[prop];if(prop==="date"){this.setDate(nextProps);shouldUpdateInput=true;}else if(prop==="format"){this.setFormat(nextProps);shouldUpdateInput=true;}}} if(shouldUpdateInput){this.updateInput();} this.bootstrapDateTimePicker(pickerParams);} willUnmount(){window.$(this.el).off();this.bootstrapDateTimePicker("destroy");} getOptions(useStatic=false){return{format:!useStatic||isValidStaticFormat(this.format)?this.format:this.staticFormat,locale:this.date.locale,timezone:this.isLocal,};} initFormat(){this.defaultFormat=localization.dateFormat;this.staticFormat="yyyy/MM/dd";this.formatValue=formatters.get("date");this.parseValue=parsers.get("date");this.isLocal=false;} setDate({date,locale}){this.date=locale?date.setLocale(locale):date;} setFormat({format}){this.format=format||this.defaultFormat;} updateInput({useStatic}={}){try{this.inputRef.el.value=this.formatValue(this.date,this.getOptions(useStatic));}catch(_err){}} bootstrapDateTimePicker(commandOrParams){if(typeof commandOrParams==="object"){const format=isValidStaticFormat(this.format)?this.format:this.staticFormat;const params={...commandOrParams,format:luxonFormatToMomentFormat(format)};if(!params.locale&&commandOrParams.date){params.locale=commandOrParams.date.locale;} for(const prop in params){if(params[prop]instanceof DateTime){const luxonDate=params[prop];const momentDate=luxonDateToMomentDate(luxonDate);params[prop]=momentDate;}} commandOrParams=params;} return window.$(this.el).datetimepicker(commandOrParams);} onInputClick(){if(!this.datePickerShown){this.updateInput({useStatic:true});} this.bootstrapDateTimePicker("toggle");} onDateChange({useStatic}={}){let date;try{date=this.parseValue(this.inputRef.el.value,this.getOptions(useStatic));}catch(_err){} if(!date||date.equals(this.date)){this.updateInput();}else{this.state.warning=date>DateTime.local();this.trigger("datetime-changed",{date});}} onWindowScroll(ev){if(ev.target!==this.inputRef.el){this.bootstrapDateTimePicker("hide");}}} DatePicker.defaultProps={calendarWeeks:true,icons:{clear:"fa fa-delete",close:"fa fa-check primary",date:"fa fa-calendar",down:"fa fa-chevron-down",next:"fa fa-chevron-right",previous:"fa fa-chevron-left",time:"fa fa-clock-o",today:"fa fa-calendar-check-o",up:"fa fa-chevron-up",},maxDate:DateTime.fromObject({year:9999,month:12,day:31}),minDate:DateTime.fromObject({year:1000}),useCurrent:false,widgetParent:"body",};DatePicker.props={date:DateTime,warn_future:{type:Boolean,optional:true},buttons:{type:Object,shape:{showClear:Boolean,showClose:Boolean,showToday:Boolean,},optional:true,},calendarWeeks:Boolean,format:{type:String,optional:true},icons:{type:Object,shape:{clear:String,close:String,date:String,down:String,next:String,previous:String,time:String,today:String,up:String,},},keyBinds:{validate:(kb)=>typeof kb==="object"||kb===null,optional:true},locale:{type:String,optional:true},maxDate:DateTime,minDate:DateTime,readonly:{type:Boolean,optional:true},useCurrent:Boolean,widgetParent:String,};DatePicker.template="web.DatePicker";const DateTimePicker=__exports.DateTimePicker=class DateTimePicker extends DatePicker{initFormat(){this.defaultFormat=localization.dateTimeFormat;this.staticFormat="yyyy/MM/dd HH:mm:ss";this.formatValue=formatters.get("datetime");this.parseValue=parsers.get("datetime");this.isLocal=true;}} DateTimePicker.defaultProps={...DatePicker.defaultProps,buttons:{showClear:false,showClose:true,showToday:false,},};return __exports;});; /* /web/static/src/core/debug/debug_context.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/debug/debug_context',async function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{memoize}=require("@web/core/utils/functions");const{useEffect}=require("@web/core/utils/hooks");const{useEnv,useSubEnv}=owl.hooks;const debugRegistry=registry.category("debug");const getAccessRights=memoize(async function getAccessRights(orm){const rightsToCheck={"ir.ui.view":"write","ir.rule":"read","ir.model.access":"read",};const proms=Object.entries(rightsToCheck).map(([model,operation])=>{return orm.call(model,"check_access_rights",[],{operation,raise_exception:false,});});const[canEditView,canSeeRecordRules,canSeeModelAccess]=await Promise.all(proms);const accessRights={canEditView,canSeeRecordRules,canSeeModelAccess};return accessRights;});class DebugContext{constructor(env,defaultCategories){this.orm=env.services.orm;this.categories=new Map(defaultCategories.map((cat)=>[cat,[{}]]));} activateCategory(category,context){const contexts=this.categories.get(category)||new Set();contexts.add(context);this.categories.set(category,contexts);return()=>{contexts.delete(context);if(contexts.size===0){this.categories.delete(category);}};} async getItems(env){const accessRights=await getAccessRights(this.orm);return[...this.categories.entries()].flatMap(([category,contexts])=>{return debugRegistry.category(category).getAll().map((factory)=>factory(Object.assign({env,accessRights},...contexts)));}).filter(Boolean).sort((x,y)=>{const xSeq=x.sequence||1000;const ySeq=y.sequence||1000;return xSeq-ySeq;});}} const debugContextSymbol=Symbol("debugContext");__exports.createDebugContext=createDebugContext;function createDebugContext(env,{categories=[]}={}){return{[debugContextSymbol]:new DebugContext(env,categories)};} __exports.useOwnDebugContext=useOwnDebugContext;function useOwnDebugContext({categories=[]}={}){useSubEnv(createDebugContext(useEnv(),{categories}));} __exports.useEnvDebugContext=useEnvDebugContext;function useEnvDebugContext(){const debugContext=useEnv()[debugContextSymbol];if(!debugContext){throw new Error("There is no debug context available in the current environment.");} return debugContext;} __exports.useDebugCategory=useDebugCategory;function useDebugCategory(category,context={}){const env=useEnv();if(env.debug){const debugContext=useEnvDebugContext();useEffect(()=>debugContext.activateCategory(category,context),()=>[]);}} return __exports;});; /* /web/static/src/core/debug/debug_menu_basic.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/debug/debug_menu_basic',async function(require){'use strict';let __exports={};const{useEnvDebugContext}=require("@web/core/debug/debug_context");const{Component}=owl;const DebugMenuBasic=__exports.DebugMenuBasic=class DebugMenuBasic extends Component{setup(){const debugContext=useEnvDebugContext();this.getElements=async()=>{this.elements=await debugContext.getItems(this.env);};}} DebugMenuBasic.template="web.DebugMenu";return __exports;});; /* /web/static/src/core/debug/debug_menu_items.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/debug/debug_menu_items',async function(require){'use strict';let __exports={};const{browser}=require("@web/core/browser/browser");const{routeToUrl}=require("@web/core/browser/router_service");const{registry}=require("@web/core/registry");function activateAssetsDebugging({env}){return{type:"item",description:env._t("Activate Assets Debugging"),callback:()=>{browser.location.search="?debug=assets";},sequence:410,};} function activateTestsAssetsDebugging({env}){return{type:"item",description:env._t("Activate Tests Assets Debugging"),callback:()=>{browser.location.search="?debug=assets,tests";},sequence:420,};} __exports.regenerateAssets=regenerateAssets;function regenerateAssets({env}){return{type:"item",description:env._t("Regenerate Assets Bundles"),callback:async()=>{const domain=["&",["res_model","=","ir.ui.view"],"|",["name","=like","%.assets_%.css"],["name","=like","%.assets_%.js"],];const ids=await env.services.orm.search("ir.attachment",domain);await env.services.orm.unlink("ir.attachment",ids);browser.location.reload();},sequence:430,};} function becomeSuperuser({env}){const becomeSuperuserURL=browser.location.origin+"/web/become";return{type:"item",description:env._t("Become Superuser"),hide:!env.services.user.isAdmin,href:becomeSuperuserURL,callback:()=>{browser.open(becomeSuperuserURL,"_self");},sequence:440,};} function leaveDebugMode({env}){return{type:"item",description:env._t("Leave the Developer Tools"),callback:()=>{const route=env.services.router.current;route.search.debug="";browser.location.href=browser.location.origin+routeToUrl(route);},sequence:450,};} registry.category("debug").category("default").add("activateAssetsDebugging",activateAssetsDebugging).add("regenerateAssets",regenerateAssets).add("becomeSuperuser",becomeSuperuser).add("leaveDebugMode",leaveDebugMode).add("activateTestsAssetsDebugging",activateTestsAssetsDebugging);return __exports;});; /* /web/static/src/core/debug/debug_providers.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/debug/debug_providers',async function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{browser}=require("@web/core/browser/browser");const{routeToUrl}=require("@web/core/browser/router_service");const commandProviderRegistry=registry.category("command_provider");commandProviderRegistry.add("debug",{provide:(env,options)=>{const result=[];if(env.debug){result.push({action(){const route=env.services.router.current;route.search.debug="";browser.location.href=browser.location.origin+routeToUrl(route);},category:"debug",name:env._t("Deactivate debug mode"),});}else{if(options.searchValue.toLowerCase()==="debug"){result.push({action(){browser.location.search="?debug=assets";},category:"debug",name:env._t("Activate debug mode"),});}} return result;},});return __exports;});; /* /web/static/src/core/debug/debug_utils.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/debug/debug_utils',async function(require){'use strict';let __exports={};__exports.editModelDebug=editModelDebug;function editModelDebug(env,title,model,id){return env.services.action.doAction({res_model:model,res_id:id,name:title,type:"ir.actions.act_window",views:[[false,"form"]],view_mode:"form",target:"new",flags:{action_buttons:true,headless:true},});} return __exports;});; /* /web/static/src/core/debug/profiling/profiling_item.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/debug/profiling/profiling_item',async function(require){'use strict';let __exports={};const{DropdownItem}=require("@web/core/dropdown/dropdown_item");const{useBus,useService}=require("@web/core/utils/hooks");const{Component}=owl;const ProfilingItem=__exports.ProfilingItem=class ProfilingItem extends Component{setup(){this.profiling=useService("profiling");useBus(this.props.bus,"UPDATE",this.render);} changeParam(param,ev){this.profiling.setParam(param,ev.target.value);} toggleParam(param,ev){const value=this.profiling.state.params.execution_context_qweb;this.profiling.setParam(param,!value);} openProfiles(){if(this.env.services.action){this.env.services.action.doAction("base.action_menu_ir_profile");}else{window.location="/web/#action=base.action_menu_ir_profile";}}} ProfilingItem.components={DropdownItem};ProfilingItem.template="web.DebugMenu.ProfilingItem";return __exports;});; /* /web/static/src/core/debug/profiling/profiling_service.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/debug/profiling/profiling_service',async function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{ProfilingItem}=require("@web/core/debug/profiling/profiling_item");const{session}=require("@web/session");const{core}=owl;const profilingService={dependencies:["orm"],start(env,{orm}){const state={session:session.profile_session||false,collectors:session.profile_collectors||["sql","traces_async"],params:session.profile_params||{},get isEnabled(){return Boolean(state.session);},};const bus=new core.EventBus();let recordingIcon=null;function updateDebugIcon(){const debugItem=document.querySelector(".o_main_navbar .o_debug_manager .fa-bug");if(state.isEnabled){recordingIcon=document.createElement("span");recordingIcon.classList.add("o_recording","text-danger","fa","fa-circle");debugItem.appendChild(recordingIcon);}else if(recordingIcon){debugItem.removeChild(recordingIcon);recordingIcon=null;}} if(env.debug){env.bus.on("WEB_CLIENT_READY",null,updateDebugIcon);} async function setProfiling(params){const kwargs=Object.assign({collectors:state.collectors,params:state.params,profile:state.isEnabled,},params);const resp=await orm.call("ir.profile","set_profiling",[],kwargs);if(resp.type){env.services.action.doAction(resp);}else{state.session=resp.session;state.collectors=resp.collectors;state.params=resp.params;bus.trigger("UPDATE");updateDebugIcon();}} function profilingSeparator(){return{type:"separator",sequence:500,};} function profilingItem(){return{type:"component",Component:ProfilingItem,props:{bus},sequence:510,};} registry.category("debug").category("default").add("profilingSeparator",profilingSeparator).add("profilingItem",profilingItem);return{state,async toggleProfiling(){await setProfiling({profile:!state.isEnabled});},async toggleCollector(collector){let nextCollectors=state.collectors.slice();const index=nextCollectors.indexOf(collector);if(index>=0){nextCollectors.splice(index,1);}else{nextCollectors.push(collector);} await setProfiling({collectors:nextCollectors});},async setParam(key,value){const nextParams=Object.assign({},state.params);nextParams[key]=value;await setProfiling({params:nextParams});},isCollectorEnabled(collector){return state.collectors.includes(collector);},};},};registry.category("services").add("profiling",profilingService);return __exports;});; /* /web/static/src/core/dialog/dialog.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/dialog/dialog',async function(require){'use strict';let __exports={};const{useHotkey}=require("@web/core/hotkeys/hotkey_hook");const{useActiveElement}=require("@web/core/ui/ui_service");const{Component,hooks}=owl;const{useRef,useSubEnv}=hooks;const Dialog=__exports.Dialog=class Dialog extends Component{setup(){if(this.constructor===Dialog){throw new Error("Dialog should not be used by itself. Please use the dialog service with a Dialog subclass.");} this.modalRef=useRef("modal");useActiveElement("modal");useHotkey("escape",()=>{this.close();});useSubEnv({inDialog:true});this.close=this.close.bind(this);this.contentClass=this.constructor.contentClass;this.fullscreen=this.constructor.fullscreen;this.renderFooter=this.constructor.renderFooter;this.renderHeader=this.constructor.renderHeader;this.size=this.constructor.size;this.technical=this.constructor.technical;this.title=this.constructor.title;} close(){this.props.close();}} Dialog.template="web.Dialog";Dialog.contentClass=null;Dialog.fullscreen=false;Dialog.renderFooter=true;Dialog.renderHeader=true;Dialog.size="modal-lg";Dialog.technical=true;Dialog.title="Odoo";Dialog.bodyTemplate=owl.tags.xml`
`;Dialog.footerTemplate="web.DialogFooterDefault";return __exports;});; /* /web/static/src/core/dialog/dialog_container.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/dialog/dialog_container',async function(require){'use strict';let __exports={};const{ErrorHandler,NotUpdatable}=require("@web/core/utils/components");const{Component,tags}=owl;const DialogContainer=__exports.DialogContainer=class DialogContainer extends Component{setup(){this.props.bus.on("UPDATE",this,this.render);} close(id){if(this.props.dialogs[id]){this.props.dialogs[id].props.close();}} handleError(error,dialogId){this.close(dialogId);Promise.resolve().then(()=>{throw error;});}} DialogContainer.components={ErrorHandler,NotUpdatable};DialogContainer.template=tags.xml`
`;return __exports;});; /* /web/static/src/core/dialog/dialog_service.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/dialog/dialog_service',async function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{Dialog}=require("@web/core/dialog/dialog");const{DialogContainer}=require("@web/core/dialog/dialog_container");const{core}=owl;const{EventBus}=core;const dialogService=__exports.dialogService={start(){const dialogs={};const bus=new EventBus();let dialogId=0;registry.category("main_components").add("DialogContainer",{Component:DialogContainer,props:{bus,dialogs},});function add(dialogClass,props,options={}){if(!(dialogClass.prototype instanceof Dialog)){throw new Error(`${dialogClass.name} must be a subclass of Dialog`);} const id=++dialogId;function close(){if(dialogs[id]){delete dialogs[id];if(options.onClose){options.onClose();} bus.trigger("UPDATE");}} const dialog={id,class:dialogClass,props:{...props,close},};dialogs[id]=dialog;bus.trigger("UPDATE");return close;} return{add};},};registry.category("services").add("dialog",dialogService);return __exports;});; /* /web/static/src/core/domain.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/domain',async function(require){'use strict';let __exports={};const{evaluate,formatAST,parseExpr}=require("@web/core/py_js/py");const{toPyValue}=require("@web/core/py_js/py_utils");class InvalidDomainError extends Error{} const Domain=__exports.Domain=class Domain{static combine(domains,operator){if(domains.length===0){return new Domain([]);} const domain1=domains[0]instanceof Domain?domains[0]:new Domain(domains[0]);if(domains.length===1){return domain1;} const domain2=Domain.combine(domains.slice(1),operator);const result=new Domain([]);const astValues1=domain1.ast.value;const astValues2=domain2.ast.value;const op=operator==="AND"?"&":"|";const combinedAST={type:4,value:astValues1.concat(astValues2)};result.ast=normalizeDomainAST(combinedAST,op);return result;} static and(domains){return Domain.combine(domains,"AND");} static or(domains){return Domain.combine(domains,"OR");} static not(domain){const result=new Domain(domain);result.ast.value.unshift({type:1,value:"!"});return result;} constructor(descr=[]){if(descr instanceof Domain){return new Domain(descr.toString());}else{const rawAST=typeof descr==="string"?parseExpr(descr):toAST(descr);this.ast=normalizeDomainAST(rawAST);}} contains(record){const expr=evaluate(this.ast,record);return matchDomain(record,expr);} toString(){return formatAST(this.ast);} toList(context){return evaluate(this.ast,context);}} const TRUE_LEAF=[1,"=",1];const FALSE_LEAF=[0,"=",1];const TRUE_DOMAIN=new Domain([TRUE_LEAF]);const FALSE_DOMAIN=new Domain([FALSE_LEAF]);Domain.TRUE=TRUE_DOMAIN;Domain.FALSE=FALSE_DOMAIN;function toAST(domain){const elems=domain.map((elem)=>{switch(elem){case"!":case"&":case"|":return{type:1,value:elem};default:return{type:10,value:elem.map(toPyValue),};}});return{type:4,value:elems};} function normalizeDomainAST(domain,op="&"){if(domain.type!==4){throw new InvalidDomainError("Invalid domain AST");} if(domain.value.length===0){return domain;} let expected=1;for(let child of domain.value){if(child.type===1&&(child.value==="&"||child.value==="|")){expected++;}else if(child.type!==1||child.value!=="!"){expected--;}} let values=domain.value.slice();while(expected<0){expected++;values.unshift({type:1,value:op});} if(expected>0){throw new InvalidDomainError(`invalid domain ${formatAST(domain)} (missing ${expected} segment(s))`);} return{type:4,value:values};} function matchCondition(record,condition){if(typeof condition==="boolean"){return condition;} const[field,operator,value]=condition;const fieldValue=typeof field==="number"?field:record[field];switch(operator){case"=":case"==":return fieldValue===value;case"!=":case"<>":return fieldValue!==value;case"<":return fieldValue":return fieldValue>value;case">=":return fieldValue>=value;case"in":{const val=Array.isArray(value)?value:[value];const fieldVal=Array.isArray(fieldValue)?fieldValue:[fieldValue];return fieldVal.some((fv)=>val.includes(fv));} case"not in":{const val=Array.isArray(value)?value:[value];const fieldVal=Array.isArray(fieldValue)?fieldValue:[fieldValue];return!fieldVal.some((fv)=>val.includes(fv));} case"like":if(fieldValue===false){return false;} return fieldValue.indexOf(value)>=0;case"=like":if(fieldValue===false){return false;} return new RegExp(value.replace(/%/g,".*")).test(fieldValue);case"ilike":if(fieldValue===false){return false;} return fieldValue.toLowerCase().indexOf(value.toLowerCase())>=0;case"=ilike":if(fieldValue===false){return false;} return new RegExp(value.replace(/%/g,".*"),"i").test(fieldValue);} throw new InvalidDomainError("could not match domain");} function makeOperators(record){const match=matchCondition.bind(null,record);return{"!":(x)=>!match(x),"&":(a,b)=>match(a)&&match(b),"|":(a,b)=>match(a)||match(b),};} function matchDomain(record,domain){if(domain.length===0){return true;} const operators=makeOperators(record);const reversedDomain=Array.from(domain).reverse();const condStack=[];for(const item of reversedDomain){if(item in operators){const operator=operators[item];const operands=condStack.splice(-operator.length);condStack.push(operator(...operands));}else{condStack.push(item);}} return matchCondition(record,condStack.pop());} return __exports;});; /* /web/static/src/core/dropdown/dropdown.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/dropdown/dropdown',async function(require){'use strict';let __exports={};const{useBus,useEffect,useService}=require("@web/core/utils/hooks");const{usePosition}=require("@web/core/position/position_hook");const{useDropdownNavigation}=require("@web/core/dropdown/dropdown_navigation_hook");const{ParentClosingMode}=require("@web/core/dropdown/dropdown_item");const{localization}=require("@web/core/l10n/localization");const{Component,core,hooks,useState,QWeb}=owl;const{EventBus}=core;const{onWillStart,useExternalListener,useRef,useSubEnv}=hooks;const DIRECTION_CARET_CLASS={bottom:"dropdown",top:"dropup",left:"dropleft",right:"dropright",};const Dropdown=__exports.Dropdown=class Dropdown extends Component{setup(){this.state=useState({open:this.props.startOpen,groupIsOpen:this.props.startOpen,});onWillStart(()=>{if(this.state.open&&this.props.beforeOpen){return this.props.beforeOpen();}});if(!this.props.manualOnly){useExternalListener(window,"click",this.onWindowClicked);useBus(Dropdown.bus,"state-changed",this.onDropdownStateChanged);} this.ui=useService("ui");useEffect(()=>{Promise.resolve().then(()=>{this.myActiveEl=this.ui.activeElement;});},()=>[]);this.hasParentDropdown=this.env.inDropdown;useSubEnv({inDropdown:true});useDropdownNavigation();let position=this.props.position||(this.hasParentDropdown?"right-start":"bottom-start");let[direction,variant="middle"]=position.split("-");if(localization.direction==="rtl"){if(["bottom","top"].includes(direction)){variant=variant==="start"?"end":"start";}else{direction=direction==="left"?"right":"left";} position=[direction,variant].join("-");} const positioningOptions={popper:"menuRef",position,};this.directionCaretClass=DIRECTION_CARET_CLASS[direction];this.togglerRef=useRef("togglerRef");if(this.props.toggler==="parent"){useEffect(()=>{const onClick=(ev)=>{if(this.el.contains(ev.target)){return;} this.toggle();};this.el.parentElement.addEventListener("click",onClick);return()=>{this.el.parentElement.removeEventListener("click",onClick);};},()=>[]);usePosition(()=>this.el.parentElement,positioningOptions);}else{const togglerRef=useRef("togglerRef");usePosition(()=>togglerRef.el,positioningOptions);}} async changeStateAndNotify(stateSlice){if(stateSlice.open&&this.props.beforeOpen){await this.props.beforeOpen();} Object.assign(this.state,stateSlice);const stateChangedPayload={emitter:this,newState:{...this.state},};Dropdown.bus.trigger("state-changed",stateChangedPayload);} close(){return this.changeStateAndNotify({open:false,groupIsOpen:false});} open(){return this.changeStateAndNotify({open:true,groupIsOpen:true});} toggle(){const toggled=!this.state.open;return this.changeStateAndNotify({open:toggled,groupIsOpen:toggled});} onItemSelected(ev){const{dropdownClosingRequest}=ev.detail;const closeAll=dropdownClosingRequest.mode===ParentClosingMode.AllParents;const closeSelf=dropdownClosingRequest.isFresh&&dropdownClosingRequest.mode===ParentClosingMode.ClosestParent;if(!this.props.manualOnly&&(closeAll||closeSelf)){this.close();} ev.detail.dropdownClosingRequest.isFresh=false;} onDropdownStateChanged(args){if(this.el.contains(args.emitter.el)){return;} if(args.emitter.el.parentElement===this.el.parentElement){this.state.groupIsOpen=args.newState.groupIsOpen;if(this.state.open&&args.newState.open){this.state.open=false;}}else{if(this.state.open&&args.newState.open){this.close();}}} onTogglerClick(){this.toggle();} onTogglerMouseEnter(){if(this.state.groupIsOpen&&!this.state.open){this.open();}} onWindowClicked(ev){if(!this.state.open){return;} if(this.ui.activeElement!==this.myActiveEl){return;} const rootEl=this.props.toggler==="parent"?this.el.parentElement:this.el;const gotClickedInside=rootEl.contains(ev.target);if(!gotClickedInside){this.close();}}} Dropdown.bus=new EventBus();Dropdown.props={toggler:{type:String,optional:true,validate:(prop)=>["parent"].includes(prop),},startOpen:{type:Boolean,optional:true,},manualOnly:{type:Boolean,optional:true,},menuClass:{type:String,optional:true,},beforeOpen:{type:Function,optional:true,},togglerClass:{type:String,optional:true,},hotkey:{type:String,optional:true,},title:{type:String,optional:true,},position:{type:String,optional:true,},};Dropdown.template="web.Dropdown";QWeb.registerComponent("Dropdown",Dropdown);return __exports;});; /* /web/static/src/core/dropdown/dropdown_item.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/dropdown/dropdown_item',async function(require){'use strict';let __exports={};const{Component,QWeb}=owl;const ParentClosingMode=__exports.ParentClosingMode={None:"none",ClosestParent:"closest",AllParents:"all",};const DropdownItem=__exports.DropdownItem=class DropdownItem extends Component{onClick(ev){if(this.props.href){ev.preventDefault();} const detail={payload:this.props.payload,dropdownClosingRequest:{isFresh:true,mode:this.props.parentClosingMode,},};this.trigger("dropdown-item-selected",detail);}} DropdownItem.template="web.DropdownItem";DropdownItem.props={payload:{type:Object,optional:true,},parentClosingMode:{type:ParentClosingMode,optional:true,},hotkey:{type:String,optional:true,},href:{type:String,optional:true,},title:{type:String,optional:true,},};DropdownItem.defaultProps={parentClosingMode:ParentClosingMode.AllParents,};QWeb.registerComponent("DropdownItem",DropdownItem);return __exports;});; /* /web/static/src/core/dropdown/dropdown_navigation_hook.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/dropdown/dropdown_navigation_hook',async function(require){'use strict';let __exports={};const{useEffect,useService}=require("@web/core/utils/hooks");const{browser}=require("@web/core/browser/browser");const{localization}=require("@web/core/l10n/localization");const{scrollTo}=require("@web/core/utils/scrolling");const{hooks}=owl;const{useComponent,useRef}=hooks;const ACTIVE_MENU_ELEMENT_CLASS="focus";const MENU_ELEMENTS_SELECTORS=[":scope > .dropdown-item",":scope > .dropdown"];const NEXT_ACTIVE_INDEX_FNS={FIRST:()=>0,LAST:(list)=>list.length-1,NEXT:(list,prevActiveIndex)=>(prevActiveIndex+1)%list.length,PREV:(list,prevActiveIndex)=>(prevActiveIndex<=0?list.length:prevActiveIndex)-1,};__exports.useDropdownNavigation=useDropdownNavigation;function useDropdownNavigation(){const comp=useComponent();if(comp.hasParentDropdown&&comp.props.toggler==="parent"){throw new Error("A nested Dropdown must use its standard toggler");} const originalOnTogglerClick=comp.onTogglerClick.bind(comp);comp.onTogglerClick=(ev)=>{if(comp.hasParentDropdown&&!ev.__fromDropdownNavigation){return;} originalOnTogglerClick();};const originalOnTogglerMouseEnter=comp.onTogglerMouseEnter.bind(comp);comp.onTogglerMouseEnter=()=>{if(comp.hasParentDropdown){return;} originalOnTogglerMouseEnter();};let mouseSelectionActive=true;const menuRef=useRef("menuRef");let menuElements=[];useEffect(()=>{if(!comp.state.open){return;} const addedListeners=[];const queryResult=menuRef.el.querySelectorAll(MENU_ELEMENTS_SELECTORS.join());for(const el of queryResult){const isSubDropdown=el.classList.contains("dropdown");const isSubDropdownOpen=()=>el.classList.contains("show");const navTarget=isSubDropdown?el.querySelector(":scope > .dropdown-toggle"):el;let subDropdownTimeout;const closeSubDropdown=()=>{browser.clearTimeout(subDropdownTimeout);subDropdownTimeout=browser.setTimeout(()=>{if(isSubDropdownOpen()){const ev=new MouseEvent("click",{bubbles:false});ev.__fromDropdownNavigation=true;navTarget.dispatchEvent(ev);}},200);};const openSubDropdown=(immediate=false)=>{browser.clearTimeout(subDropdownTimeout);subDropdownTimeout=browser.setTimeout(()=>{if(!isSubDropdownOpen()){const ev=new MouseEvent("click",{bubbles:false});ev.__fromDropdownNavigation=true;navTarget.dispatchEvent(ev);}},immediate?0:200);};const makeOnlyActive=()=>{for(const menuElement of menuElements){if(menuElement.el===el){continue;} menuElement.navTarget.classList.remove(ACTIVE_MENU_ELEMENT_CLASS);if(menuElement.isSubDropdown){menuElement.closeSubDropdown();}} navTarget.classList.add(ACTIVE_MENU_ELEMENT_CLASS);};const menuElement={el,get isActive(){return navTarget.classList.contains(ACTIVE_MENU_ELEMENT_CLASS);},makeOnlyActive,navTarget,get isSubDropdownOpen(){return isSubDropdownOpen();},isSubDropdown,closeSubDropdown,openSubDropdown,};menuElements.push(menuElement);const elementListeners={mouseenter:()=>{if(!mouseSelectionActive){mouseSelectionActive=true;}else{makeOnlyActive();if(isSubDropdown){openSubDropdown();}}},};for(const[eventType,listener]of Object.entries(elementListeners)){navTarget.addEventListener(eventType,listener);} addedListeners.push([navTarget,elementListeners]);} return()=>{menuElements=[];mouseSelectionActive=true;for(const[navTarget,listeners]of addedListeners){for(const[eventType,listener]of Object.entries(listeners)){navTarget.removeEventListener(eventType,listener);}}};});const getActiveMenuElement=()=>{return menuElements.find((menuElement)=>menuElement.isActive);};const setActiveMenuElement=(menuElement)=>{if(menuElements.length){if(typeof menuElement==="string"){const prevIndex=menuElements.indexOf(getActiveMenuElement());const nextIndex=NEXT_ACTIVE_INDEX_FNS[menuElement](menuElements,prevIndex);menuElement=menuElements[nextIndex];} menuElement.makeOnlyActive();scrollTo(menuElement.el,{scrollable:menuElement.el.parentElement});}};useEffect((open)=>{if(open&&comp.hasParentDropdown){setActiveMenuElement("FIRST");}},()=>[comp.state.open]);const hotkeyService=useService("hotkey");const closeSubDropdown=comp.hasParentDropdown?comp.close:()=>{};const openSubDropdown=()=>{const menuElement=getActiveMenuElement();if(menuElement&&menuElement.isSubDropdown){menuElement.openSubDropdown(true);}};const selectActiveMenuElement=()=>{const menuElement=getActiveMenuElement();if(menuElement){if(menuElement.isSubDropdown){menuElement.openSubDropdown(true);}else{menuElement.navTarget.click();}}};let hotkeyRemoves=[];const hotkeyCallbacks={home:()=>setActiveMenuElement("FIRST"),end:()=>setActiveMenuElement("LAST"),tab:()=>setActiveMenuElement("NEXT"),"shift+tab":()=>setActiveMenuElement("PREV"),arrowdown:()=>setActiveMenuElement("NEXT"),arrowup:()=>setActiveMenuElement("PREV"),arrowleft:localization.direction==="rtl"?openSubDropdown:closeSubDropdown,arrowright:localization.direction==="rtl"?closeSubDropdown:openSubDropdown,enter:selectActiveMenuElement,escape:comp.close,};useEffect((open)=>{if(!open){return;} for(const[hotkey,callback]of Object.entries(hotkeyCallbacks)){const callbackWrapper=()=>{const hasOpenedSubDropdown=menuElements.some((m)=>m.isSubDropdownOpen);if(!hasOpenedSubDropdown){mouseSelectionActive=false;callback.call(comp);}};hotkeyRemoves.push(hotkeyService.add(hotkey,callbackWrapper,{allowRepeat:true}));} return()=>{for(const removeHotkey of hotkeyRemoves){removeHotkey();} hotkeyRemoves=[];};},()=>[comp.state.open]);} return __exports;});; /* /web/static/src/core/effects/effect_container.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/effects/effect_container',async function(require){'use strict';let __exports={};const{Component,tags}=owl;const EffectContainer=__exports.EffectContainer=class EffectContainer extends Component{setup(){this.effect=null;this.props.bus.on("UPDATE",this,(effect)=>{this.effect=effect;this.render();});} removeEffect(){this.effect=null;this.render();}} EffectContainer.template=tags.xml`
`;return __exports;});; /* /web/static/src/core/effects/effect_service.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/effects/effect_service',async function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{EffectContainer}=require("@web/core/effects/effect_container");const{RainbowMan}=require("@web/core/effects/rainbow_man");const{EventBus}=owl.core;const effectRegistry=registry.category("effects");function rainbowMan(env,params={}){let message=params.message;if(message instanceof jQuery){console.log("Providing a jQuery element to an effect is deprecated. Note that all event handlers will be lost.");message=message.html();}else if(message instanceof Element){console.log("Providing an HTML element to an effect is deprecated. Note that all event handlers will be lost.");message=message.outerHTML;}else if(!message){message=env._t("well Done!");} if(env.services.user.showEffect){return{Component:params.Component||RainbowMan,props:{imgUrl:params.img_url||"/web/static/img/smile.svg",fadeout:params.fadeout,message,messageIsHtml:params.messageIsHtml||false,...params.props,},};} env.services.notification.add(message);} effectRegistry.add("rainbow_man",rainbowMan);const effectService=__exports.effectService={start(env){const bus=new EventBus();registry.category("main_components").add("EffectContainer",{Component:EffectContainer,props:{bus},});let effectId=0;function add(params){const type=params.type||"rainbow_man";const effect=effectRegistry.get(type);const{Component,props}=effect(env,params)||{};if(Component){bus.trigger("UPDATE",{Component,props,id:effectId++});}} return{add};},};registry.category("services").add("effect",effectService);return __exports;});; /* /web/static/src/core/effects/rainbow_man.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/effects/rainbow_man',async function(require){'use strict';let __exports={};const{browser}=require("@web/core/browser/browser");const{useEffect}=require("@web/core/utils/hooks");const{Component,hooks}=owl;const RainbowMan=__exports.RainbowMan=class RainbowMan extends Component{setup(){hooks.useExternalListener(document.body,"click",this.closeRainbowMan);const fadeout="fadeout"in this.props?this.props.fadeout:"medium";const delay=fadeout?RainbowMan.rainbowFadeouts[fadeout]:false;this.delay=typeof delay==="number"?delay:false;if(this.delay!==false){useEffect(()=>{const timeout=browser.setTimeout(()=>{this.el.classList.add("o_reward_fading");},this.delay);return()=>browser.clearTimeout(timeout);},()=>[]);}} onAnimationEnd(ev){if(this.delay!==false&&ev.animationName==="reward-fading-reverse"){ev.stopPropagation();this.closeRainbowMan();}} closeRainbowMan(){this.props.close();}} RainbowMan.template="web.RainbowMan";RainbowMan.rainbowFadeouts={slow:4500,medium:3500,fast:2000,no:false};return __exports;});; /* /web/static/src/core/errors/error_dialogs.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/errors/error_dialogs',async function(require){'use strict';let __exports={};const{browser}=require("@web/core/browser/browser");const{Dialog}=require("@web/core/dialog/dialog");const{_lt}=require("@web/core/l10n/translation");const{registry}=require("@web/core/registry");const{useService}=require("@web/core/utils/hooks");const{capitalize}=require("@web/core/utils/strings");const{hooks}=owl;const{useState}=hooks;const odooExceptionTitleMap=__exports.odooExceptionTitleMap=new Map(Object.entries({"odoo.addons.base.models.ir_mail_server.MailDeliveryException":_lt("MailDeliveryException"),"odoo.exceptions.AccessDenied":_lt("Access Denied"),"odoo.exceptions.MissingError":_lt("Missing Record"),"odoo.exceptions.UserError":_lt("User Error"),"odoo.exceptions.ValidationError":_lt("Validation Error"),"odoo.exceptions.AccessError":_lt("Access Error"),"odoo.exceptions.Warning":_lt("Warning"),}));const ErrorDialog=__exports.ErrorDialog=class ErrorDialog extends Dialog{setup(){super.setup();this.state=useState({showTraceback:false,});} onClickClipboard(){browser.navigator.clipboard.writeText(`${this.props.name}\n${this.props.message}\n${this.props.traceback}`);}} ErrorDialog.contentClass="o_dialog_error";ErrorDialog.bodyTemplate="web.ErrorDialogBody";ErrorDialog.title=_lt("Odoo Error");const ClientErrorDialog=__exports.ClientErrorDialog=class ClientErrorDialog extends ErrorDialog{} ClientErrorDialog.title=_lt("Odoo Client Error");const NetworkErrorDialog=__exports.NetworkErrorDialog=class NetworkErrorDialog extends ErrorDialog{} NetworkErrorDialog.title=_lt("Odoo Network Error");const RPCErrorDialog=__exports.RPCErrorDialog=class RPCErrorDialog extends ErrorDialog{setup(){super.setup();this.inferTitle();this.traceback=this.props.traceback;if(this.props.data&&this.props.data.debug){this.traceback=`${this.props.data.debug}`;}} inferTitle(){if(this.props.exceptionName&&odooExceptionTitleMap.has(this.props.exceptionName)){this.title=odooExceptionTitleMap.get(this.props.exceptionName).toString();return;} if(!this.props.type)return;switch(this.props.type){case"server":this.title=this.env._t("Odoo Server Error");break;case"script":this.title=this.env._t("Odoo Client Error");break;case"network":this.title=this.env._t("Odoo Network Error");break;}} onClickClipboard(){browser.navigator.clipboard.writeText(`${this.props.name}\n${this.props.message}\n${this.traceback}`);}} const WarningDialog=__exports.WarningDialog=class WarningDialog extends Dialog{setup(){super.setup();this.title=this.env._t("Odoo Warning");this.inferTitle();const{data,message}=this.props;if(data&&data.arguments&&data.arguments.length>0){this.message=data.arguments[0];}else{this.message=message;}} inferTitle(){if(this.props.exceptionName&&odooExceptionTitleMap.has(this.props.exceptionName)){this.title=odooExceptionTitleMap.get(this.props.exceptionName).toString();}}} WarningDialog.bodyTemplate="web.WarningDialogBody";const RedirectWarningDialog=__exports.RedirectWarningDialog=class RedirectWarningDialog extends Dialog{setup(){super.setup();this.actionService=useService("action");const{data,subType}=this.props;const[message,actionId,buttonText,additional_context]=data.arguments;this.title=capitalize(subType)||this.env._t("Odoo Warning");this.message=message;this.actionId=actionId;this.buttonText=buttonText;this.additionalContext=additional_context;} async onClick(){const options={};if(this.additionalContext){options.additionalContext=this.additionalContext;} await this.actionService.doAction(this.actionId,options);this.close();} onCancel(){this.close();}} RedirectWarningDialog.bodyTemplate="web.RedirectWarningDialogBody";RedirectWarningDialog.footerTemplate="web.RedirectWarningDialogFooter";const Error504Dialog=__exports.Error504Dialog=class Error504Dialog extends Dialog{} Error504Dialog.bodyTemplate="web.Error504DialogBody";Error504Dialog.title=_lt("Request timeout");const SessionExpiredDialog=__exports.SessionExpiredDialog=class SessionExpiredDialog extends Dialog{onClick(){browser.location.reload();}} SessionExpiredDialog.bodyTemplate="web.SessionExpiredDialogBody";SessionExpiredDialog.footerTemplate="web.SessionExpiredDialogFooter";SessionExpiredDialog.title=_lt("Odoo Session Expired");registry.category("error_dialogs").add("odoo.exceptions.AccessDenied",WarningDialog).add("odoo.exceptions.AccessError",WarningDialog).add("odoo.exceptions.MissingError",WarningDialog).add("odoo.exceptions.UserError",WarningDialog).add("odoo.exceptions.ValidationError",WarningDialog).add("odoo.exceptions.RedirectWarning",RedirectWarningDialog).add("odoo.http.SessionExpiredException",SessionExpiredDialog).add("werkzeug.exceptions.Forbidden",SessionExpiredDialog).add("504",Error504Dialog);return __exports;});; /* /web/static/src/core/errors/error_handlers.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/errors/error_handlers',async function(require){'use strict';let __exports={};const{browser}=require("@web/core/browser/browser");const{ConnectionLostError,RPCError}=require("@web/core/network/rpc_service");const{registry}=require("@web/core/registry");const{ClientErrorDialog,ErrorDialog,NetworkErrorDialog,RPCErrorDialog,}=require("@web/core/errors/error_dialogs");const{UncaughtClientError,UncaughtCorsError,UncaughtPromiseError}=require("@web/core/errors/error_service");const errorHandlerRegistry=registry.category("error_handlers");const errorDialogRegistry=registry.category("error_dialogs");const errorNotificationRegistry=registry.category("error_notifications");function corsErrorHandler(env,error){if(error instanceof UncaughtCorsError){env.services.dialog.add(NetworkErrorDialog,{traceback:error.traceback,message:error.message,name:error.name,});return true;}} errorHandlerRegistry.add("corsErrorHandler",corsErrorHandler,{sequence:95});function clientErrorHandler(env,error){if(error instanceof UncaughtClientError){env.services.dialog.add(ClientErrorDialog,{traceback:error.traceback,message:error.message,name:error.name,});return true;}} errorHandlerRegistry.add("clientErrorHandler",clientErrorHandler,{sequence:96});__exports.rpcErrorHandler=rpcErrorHandler;function rpcErrorHandler(env,error,originalError){if(!(error instanceof UncaughtPromiseError)){return false;} if(originalError instanceof RPCError){error.unhandledRejectionEvent.preventDefault();const exceptionName=originalError.exceptionName;let ErrorComponent=originalError.Component;if(!ErrorComponent&&exceptionName){if(errorNotificationRegistry.contains(exceptionName)){const notif=errorNotificationRegistry.get(exceptionName);env.services.notification.add(notif.message||originalError.data.message,notif);return true;} if(errorDialogRegistry.contains(exceptionName)){ErrorComponent=errorDialogRegistry.get(exceptionName);}} if(!ErrorComponent&&originalError.data.context){const exceptionClass=originalError.data.context.exception_class;if(errorDialogRegistry.contains(exceptionClass)){ErrorComponent=errorDialogRegistry.get(exceptionClass);}} env.services.dialog.add(ErrorComponent||RPCErrorDialog,{traceback:error.traceback,message:originalError.message,name:originalError.name,exceptionName:originalError.exceptionName,data:originalError.data,subType:originalError.subType,code:originalError.code,type:originalError.type,});return true;}} errorHandlerRegistry.add("rpcErrorHandler",rpcErrorHandler,{sequence:97});let connectionLostNotifRemove=null;__exports.lostConnectionHandler=lostConnectionHandler;function lostConnectionHandler(env,error,originalError){if(!(error instanceof UncaughtPromiseError)){return false;} if(originalError instanceof ConnectionLostError){if(connectionLostNotifRemove){return true;} connectionLostNotifRemove=env.services.notification.add(env._t("Connection lost. Trying to reconnect..."),{sticky:true});let delay=2000;browser.setTimeout(function checkConnection(){env.services.rpc("/web/webclient/version_info",{}).then(function(){if(connectionLostNotifRemove){connectionLostNotifRemove();connectionLostNotifRemove=null;} env.services.notification.add(env._t("Connection restored. You are back online."),{type:"info",});}).catch(()=>{delay=delay*1.5+500*Math.random();browser.setTimeout(checkConnection,delay);});},delay);return true;}} errorHandlerRegistry.add("lostConnectionHandler",lostConnectionHandler,{sequence:98});function emptyRejectionErrorHandler(env,error){if(!(error instanceof UncaughtPromiseError)){return false;} env.services.dialog.add(ClientErrorDialog,{traceback:error.traceback,message:error.message,name:error.name,});return true;} errorHandlerRegistry.add("emptyRejectionErrorHandler",emptyRejectionErrorHandler,{sequence:99,});function defaultHandler(env,error){env.services.dialog.add(ErrorDialog,{traceback:error.traceback,message:error.message,name:error.name,});return true;} errorHandlerRegistry.add("defaultHandler",defaultHandler,{sequence:100});return __exports;});; /* /web/static/src/core/errors/error_service.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/errors/error_service',async function(require){'use strict';let __exports={};const{browser}=require("@web/core/browser/browser");const{_lt}=require("@web/core/l10n/translation");const{registry}=require("@web/core/registry");const{annotateTraceback,formatTraceback,getErrorTechnicalName}=require("@web/core/errors/error_utils");const UncaughtError=__exports.UncaughtError=class UncaughtError extends Error{constructor(message){super(message);this.name=getErrorTechnicalName(this);this.traceback=null;}} const UncaughtClientError=__exports.UncaughtClientError=class UncaughtClientError extends UncaughtError{constructor(message=_lt("Uncaught Javascript Error")){super(message);}} const UncaughtPromiseError=__exports.UncaughtPromiseError=class UncaughtPromiseError extends UncaughtError{constructor(message=_lt("Uncaught Promise")){super(message);this.unhandledRejectionEvent=null;}} const UncaughtCorsError=__exports.UncaughtCorsError=class UncaughtCorsError extends UncaughtError{constructor(message=_lt("Uncaught CORS Error")){super(message);}} function combineErrorNames(uncaughtError,originalError){const originalErrorName=getErrorTechnicalName(originalError);const uncaughtErrorName=getErrorTechnicalName(uncaughtError);if(originalErrorName===Error.name){return uncaughtErrorName;}else{return`${uncaughtErrorName} > ${originalErrorName}`;}} async function completeUncaughtError(env,uncaughtError,originalError){uncaughtError.name=combineErrorNames(uncaughtError,originalError);if(env.debug.includes("assets")){uncaughtError.traceback=await annotateTraceback(originalError);}else{uncaughtError.traceback=formatTraceback(originalError);} if(originalError.message){uncaughtError.message=`${uncaughtError.message} > ${originalError.message}`;}} const errorService=__exports.errorService={start(env){function handleError(error,originalError,retry=true){const services=env.services;if(!services.dialog||!services.notification||!services.rpc){if(retry){browser.setTimeout(()=>{handleError(error,originalError,false);},1000);} return;} for(let handler of registry.category("error_handlers").getAll()){if(handler(env,error,originalError)){break;}}} browser.addEventListener("error",async(ev)=>{const{colno,error:originalError,filename,lineno,message}=ev;const errorsToIgnore=["ResizeObserver loop completed with undelivered notifications.","ResizeObserver loop limit exceeded"] if(!originalError&&errorsToIgnore.includes(message)){return;} let uncaughtError;if(!filename&&!lineno&&!colno){uncaughtError=new UncaughtCorsError();uncaughtError.traceback=env._t(`Unknown CORS error\n\n`+`An unknown CORS error occured.\n`+`The error probably originates from a JavaScript file served from a different origin.\n`+`(Opening your browser console might give you a hint on the error.)`);}else{uncaughtError=new UncaughtClientError();await completeUncaughtError(env,uncaughtError,originalError);} handleError(uncaughtError,originalError);});browser.addEventListener("unhandledrejection",async(ev)=>{const originalError=ev.reason;const uncaughtError=new UncaughtPromiseError();uncaughtError.unhandledRejectionEvent=ev;if(originalError instanceof Error){await completeUncaughtError(env,uncaughtError,originalError);} handleError(uncaughtError,originalError);});},};registry.category("services").add("error",errorService,{sequence:1});return __exports;});; /* /web/static/src/core/errors/error_utils.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/errors/error_utils',async function(require){'use strict';let __exports={};const{loadAssets}=require("@web/core/assets");const{isBrowserChrome}=require("@web/core/browser/feature_detection");__exports.getErrorTechnicalName=getErrorTechnicalName;function getErrorTechnicalName(error){return error.name!==Error.name?error.name:error.constructor.name;} __exports.formatTraceback=formatTraceback;function formatTraceback(error){let traceback=error.stack;const errorName=getErrorTechnicalName(error);if(!isBrowserChrome()){traceback=`${errorName}: ${error.message}\n${error.stack}`.replace(/\n/g,"\n ");}else if(error.stack){traceback=error.stack.replace(/^[^:]*/g,errorName);} return traceback;} __exports.annotateTraceback=annotateTraceback;async function annotateTraceback(error){const traceback=formatTraceback(error);try{await loadAssets({jsLibs:["/web/static/lib/stacktracejs/stacktrace.js"],});}catch(e){return traceback;} if(error.stack){const regex=/ line (\d*) > (Function):(\d*)/gm;const subst=`:$1`;error.stack=error.stack.replace(regex,subst);} let frames;try{frames=await StackTrace.fromError(error);}catch(e){console.warn("The following error could not be annotated:",error,e);return traceback;} const lines=traceback.split("\n");if(lines[lines.length-1].trim()===""){lines.splice(-1);} const skips=lines.filter((l)=>l.includes("(index 0")).length;const offset=lines.length-frames.length-skips;let lineIndex=offset;let frameIndex=0;while(frameIndexhotkeyService.add(hotkey,callback,options),()=>[]);} return __exports;});; /* /web/static/src/core/hotkeys/hotkey_service.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/hotkeys/hotkey_service',async function(require){'use strict';let __exports={};const{isMacOS}=require("@web/core/browser/feature_detection");const{registry}=require("@web/core/registry");const{browser}=require("@web/core/browser/browser");const{getVisibleElements}=require("@web/core/utils/ui");const ALPHANUM_KEYS="abcdefghijklmnopqrstuvwxyz0123456789".split("");const NAV_KEYS=["arrowleft","arrowright","arrowup","arrowdown","pageup","pagedown","home","end","backspace","enter","tab","delete",];const MODIFIERS=new Set(["alt","control","shift"]);const AUTHORIZED_KEYS=new Set([...ALPHANUM_KEYS,...NAV_KEYS,"escape"]);const hotkeyService=__exports.hotkeyService={dependencies:["ui"],overlayModifier:"alt",start(env,{ui}){const registrations=new Map();let nextToken=0;let overlaysVisible=false;addListeners(browser);function addListeners(target){target.addEventListener("keydown",onKeydown);target.addEventListener("keyup",removeHotkeyOverlays);target.addEventListener("blur",removeHotkeyOverlays);target.addEventListener("click",removeHotkeyOverlays);} function onKeydown(event){if(!event.key){return;} if(event.code&&event.code.indexOf("Numpad")===0&&/^\d$/.test(event.key)){return;} const hotkey=getActiveHotkey(event);if(ui.isBlocked){return;} const elementsWithAccessKey=document.querySelectorAll("[accesskey]");for(const el of elementsWithAccessKey){if(el instanceof HTMLElement){el.dataset.hotkey=el.accessKey;el.removeAttribute("accesskey");}} if(hotkey===hotkeyService.overlayModifier){addHotkeyOverlays();event.preventDefault();return;} const singleKey=hotkey.split("+").pop();if(!AUTHORIZED_KEYS.has(singleKey)){return;} const targetIsEditable=event.target instanceof HTMLElement&&(/input|textarea/i.test(event.target.tagName)||event.target.isContentEditable);const shouldProtectEditable=targetIsEditable&&!event.target.dataset.allowHotkeys&&singleKey!=="escape";const infos={hotkey,shouldProtectEditable,_originalEvent:event,};dispatch(infos);removeHotkeyOverlays(event);} function dispatch(infos){let dispatched=false;const{hotkey,shouldProtectEditable,_originalEvent:event}=infos;const activeElement=ui.activeElement;for(const reg of Array.from(registrations.values()).reverse()){if(!reg.global&®.activeElement!==activeElement){continue;} if(reg.hotkey!==hotkey){continue;} if(!reg.allowRepeat&&event.repeat){continue;} if(!reg.bypassEditableProtection&&shouldProtectEditable){continue;} reg.callback();dispatched=true;break;} const overlayModParts=hotkeyService.overlayModifier.split("+");if(!dispatched&&!event.repeat&&overlayModParts.every((el)=>hotkey.includes(el))){const cleanHotkey=hotkey.split("+").filter((key)=>!overlayModParts.includes(key)).join("+");const elems=getVisibleElements(ui.activeElement,`[data-hotkey='${cleanHotkey}' i]`);for(const el of elems){el.focus();el.click();dispatched=true;break;}} if(dispatched){event.preventDefault();event.stopImmediatePropagation();}} function addHotkeyOverlays(){if(overlaysVisible){return;} for(const el of getVisibleElements(ui.activeElement,"[data-hotkey]:not(:disabled)")){const hotkey=el.dataset.hotkey;const overlay=document.createElement("div");overlay.className="o_web_hotkey_overlay";overlay.appendChild(document.createTextNode(hotkey.toUpperCase()));let overlayParent;if(el.tagName.toUpperCase()==="INPUT"){overlayParent=el.parentElement;}else{overlayParent=el;} if(overlayParent.style.position!=="absolute"){overlayParent.style.position="relative";} overlayParent.appendChild(overlay);} overlaysVisible=true;} function removeHotkeyOverlays(event){if(!overlaysVisible){return;} for(const overlay of document.querySelectorAll(".o_web_hotkey_overlay")){overlay.remove();} overlaysVisible=false;event.preventDefault();} function getActiveHotkey(ev){const hotkey=[];if(isMacOS()?ev.ctrlKey:ev.altKey){hotkey.push("alt");} if(isMacOS()?ev.metaKey:ev.ctrlKey){hotkey.push("control");} if(ev.shiftKey){hotkey.push("shift");} let key=ev.key.toLowerCase();if(ev.code&&ev.code.indexOf("Digit")===0){key=ev.code.slice(-1);} if(!AUTHORIZED_KEYS.has(key)&&ev.code&&ev.code.indexOf("Key")===0){key=ev.code.slice(-1).toLowerCase();} if(!MODIFIERS.has(key)){hotkey.push(key);} return hotkey.join("+");} function registerHotkey(hotkey,callback,options={}){if(!hotkey||hotkey.length===0){throw new Error("You must specify an hotkey when registering a registration.");} if(!callback||typeof callback!=="function"){throw new Error("You must specify a callback function when registering a registration.");} const keys=hotkey.toLowerCase().split("+").filter((k)=>!MODIFIERS.has(k));if(keys.some((k)=>!AUTHORIZED_KEYS.has(k))){throw new Error(`You are trying to subscribe for an hotkey ('${hotkey}') that contains parts not whitelisted: ${keys.join(", ")}`);}else if(keys.length>1){throw new Error(`You are trying to subscribe for an hotkey ('${hotkey}') that contains more than one single key part: ${keys.join("+")}`);} const token=nextToken++;const registration={hotkey:hotkey.toLowerCase(),callback,activeElement:null,allowRepeat:options&&options.allowRepeat,bypassEditableProtection:options&&options.bypassEditableProtection,global:options&&options.global,};registrations.set(token,registration);Promise.resolve().then(()=>{registration.activeElement=ui.activeElement;});return token;} function unregisterHotkey(token){registrations.delete(token);} return{add(hotkey,callback,options={}){const token=registerHotkey(hotkey,callback,options);return()=>{unregisterHotkey(token);};},registerIframe(iframe){addListeners(iframe.contentWindow);},};},};registry.category("services").add("hotkey",hotkeyService);return __exports;});; /* /web/static/src/core/l10n/dates.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/l10n/dates',async function(require){'use strict';let __exports={};const{localization}=require("@web/core/l10n/localization");const{_t}=require("@web/core/l10n/translation");const{memoize}=require("@web/core/utils/functions");const{sprintf}=require("@web/core/utils/strings");const{DateTime,Settings}=luxon;const SERVER_DATE_FORMAT="yyyy-MM-dd";const SERVER_TIME_FORMAT="HH:mm:ss";const alphaRegex=/[a-zA-Z]/g;const nonAlphaRegex=/[^a-zA-Z]/g;const nonDigitsRegex=/[^0-9]/g;const normalizeFormatTable={a:"ccc",A:"cccc",b:"MMM",B:"MMMM",d:"dd",H:"HH",I:"hh",j:"o",m:"MM",M:"mm",p:"a",S:"ss",W:"WW",w:"c",y:"yy",Y:"yyyy",c:"ccc MMM d HH:mm:ss yyyy",x:"MM/dd/yy",X:"HH:mm:ss",};const smartDateUnits={d:"days",m:"months",w:"weeks",y:"years",};const smartDateRegex=new RegExp(`^([+-])(\\d+)([${Object.keys(smartDateUnits).join("")}]?)$`);function parseSmartDateInput(value){const match=smartDateRegex.exec(value);if(match){let date=DateTime.utc();const offset=parseInt(match[2],10);const unit=smartDateUnits[match[3]||"d"];if(match[1]==="+"){date=date.plus({[unit]:offset});}else{date=date.minus({[unit]:offset});} return date;} return false;} function constrain(dt){let valid=dt!==false;valid=valid&&dt.isValid;valid=valid&&dt.year>=1000;valid=valid&&dt.year<10000;return valid?dt:false;} const stripAlphaDupes=memoize(function stripAlphaDupes(str){return str.replace(alphaRegex,(letter,index,str)=>{return letter===str[index-1]?"":letter;});});const strftimeToLuxonFormat=__exports.strftimeToLuxonFormat=memoize(function strftimeToLuxonFormat(value){const output=[];let inToken=false;for(let index=0;index4){result=constrain(DateTime.fromISO(value,parseOpts))||constrain(DateTime.fromSQL(value,parseOpts));}} if(!result){throw new Error(sprintf(_t("'%s' is not a correct date or datetime"),value));} return options.timezone?result:result.toUTC();} const deserializeDate=__exports.deserializeDate=(value)=>{return parseDate(value,{format:SERVER_DATE_FORMAT,numberingSystem:"latn",});};const deserializeDateTime=__exports.deserializeDateTime=(value)=>{return parseDateTime(value,{format:`${SERVER_DATE_FORMAT} ${SERVER_TIME_FORMAT}`,numberingSystem:"latn",});};const serializeDate=__exports.serializeDate=(value)=>{return formatDate(value,{format:SERVER_DATE_FORMAT,numberingSystem:"latn",});};const serializeDateTime=__exports.serializeDateTime=(value)=>{return formatDateTime(value,{format:`${SERVER_DATE_FORMAT} ${SERVER_TIME_FORMAT}`,numberingSystem:"latn",});};return __exports;});; /* /web/static/src/core/l10n/localization.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/l10n/localization',async function(require){'use strict';let __exports={};const notReadyError=new Error("Localization parameters not ready yet. Maybe add 'localization' to your dependencies?");const localization=__exports.localization={dateFormat:notReadyError,dateTimeFormat:notReadyError,timeFormat:notReadyError,decimalPoint:notReadyError,direction:notReadyError,grouping:notReadyError,multiLang:notReadyError,thousandsSep:notReadyError,weekStart:notReadyError,};return __exports;});; /* /web/static/src/core/l10n/localization_service.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/l10n/localization_service',async function(require){'use strict';let __exports={};const{session}=require("@web/session");const{browser}=require("@web/core/browser/browser");const{registry}=require("@web/core/registry");const{strftimeToLuxonFormat}=require("@web/core/l10n/dates");const{localization}=require("@web/core/l10n/localization");const{translatedTerms,_t}=require("@web/core/l10n/translation");const{Settings}=luxon;const NUMBERING_SYSTEMS=[[/^ar-(sa|001)$/i,"arab"],[/^bn/i,"beng"],[/^bo/i,"tibt"],[/^pa-in/i,"guru"],[/^ta/i,"tamldec"],[/.*/i,"latn"],];const localizationService=__exports.localizationService={dependencies:["user"],start:async(env,{user})=>{owl.config.translatableAttributes.push("data-tooltip");const cacheHashes=session.cache_hashes||{};const translationsHash=cacheHashes.translations||new Date().getTime().toString();const lang=user.lang||null;const translationURL=session.translationURL||"/web/webclient/translations";let url=`${translationURL}/${translationsHash}`;if(lang){url+=`?lang=${lang}`;} const response=await browser.fetch(url);if(!response.ok){throw new Error("Error while fetching translations");} const{lang_parameters:userLocalization,modules:modules}=await response.json();let terms={};for(const addon of Object.keys(modules)){for(const message of modules[addon].messages){terms[message.id]=message.string;}} Object.setPrototypeOf(translatedTerms,terms);env._t=_t;env.qweb.translateFn=_t;if(lang){const locale=lang==="sr@latin"?"sr-Latn-RS":lang.replace(/_/g,"-");Settings.defaultLocale=locale;for(const[re,numberingSystem]of NUMBERING_SYSTEMS){if(re.test(locale)){Settings.defaultNumberingSystem=numberingSystem;break;}}} const dateFormat=strftimeToLuxonFormat(userLocalization.date_format);const timeFormat=strftimeToLuxonFormat(userLocalization.time_format);const dateTimeFormat=`${dateFormat} ${timeFormat}`;const grouping=JSON.parse(userLocalization.grouping);Object.assign(localization,{dateFormat,timeFormat,dateTimeFormat,decimalPoint:userLocalization.decimal_point,direction:userLocalization.direction,grouping,multiLang:userLocalization.multi_lang,thousandsSep:userLocalization.thousands_sep,weekStart:userLocalization.week_start,});},};registry.category("services").add("localization",localizationService);return __exports;});; /* /web/static/src/core/l10n/translation.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/l10n/translation',async function(require){'use strict';let __exports={};const translatedTerms=__exports.translatedTerms={};__exports._t=_t;function _t(term){return translatedTerms[term]||term;} class LazyTranslatedString extends String{valueOf(){const str=super.valueOf();return _t(str);} toString(){return this.valueOf();}} __exports._lt=_lt;function _lt(term){return new LazyTranslatedString(term);} _lt("less than a minute ago");_lt("about a minute ago");_lt("%d minutes ago");_lt("about an hour ago");_lt("%d hours ago");_lt("a day ago");_lt("%d days ago");_lt("about a month ago");_lt("%d months ago");_lt("about a year ago");_lt("%d years ago");return __exports;});; /* /web/static/src/core/main_components_container.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/main_components_container',async function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{NotUpdatable,ErrorHandler}=require("@web/core/utils/components");const{Component,tags}=owl;const MainComponentsContainer=__exports.MainComponentsContainer=class MainComponentsContainer extends Component{setup(){this.Components=registry.category("main_components").getEntries();} handleComponentError(error,C){this.Components.splice(this.Components.indexOf(C),1);this.render();Promise.resolve().then(()=>{throw error;});}} MainComponentsContainer.template=tags.xml`
`;MainComponentsContainer.components={NotUpdatable,ErrorHandler};return __exports;});; /* /web/static/src/core/network/download.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/network/download',async function(require){'use strict';let __exports={};const{_lt}=require("@web/core/l10n/translation");const{makeErrorFromResponse}=require("@web/core/network/rpc_service");const{ConnectionLostError}=require("@web/core/network/rpc_service");const{browser}=require("@web/core/browser/browser");const HEX_ESCAPE_REPLACE_REGEXP=/%([0-9A-Fa-f]{2})/g;const NON_LATIN1_REGEXP=/[^\x20-\x7e\xa0-\xff]/g;const QESC_REGEXP=/\\([\u0000-\u007f])/g;const PARAM_REGEXP=/;[\x09\x20]*([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*=[\x09\x20]*("(?:[\x20!\x23-\x5b\x5d-\x7e\x80-\xff]|\\[\x20-\x7e])*"|[!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*/g;const EXT_VALUE_REGEXP=/^([A-Za-z0-9!#$%&+\-^_`{}~]+)'(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8}|)'((?:%[0-9A-Fa-f]{2}|[A-Za-z0-9!#$&+.^_`|~-])+)$/;const DISPOSITION_TYPE_REGEXP=/^([!#$%&'*+.0-9A-Z^_`a-z|~-]+)[\x09\x20]*(?:$|;)/;function decodefield(str){const match=EXT_VALUE_REGEXP.exec(str);if(!match){throw new TypeError("invalid extended field value");} const charset=match[1].toLowerCase();const encoded=match[2];switch(charset){case"iso-8859-1":return encoded.replace(HEX_ESCAPE_REPLACE_REGEXP,pdecode).replace(NON_LATIN1_REGEXP,"?");case"utf-8":return decodeURIComponent(encoded);default:throw new TypeError("unsupported charset in extended field");}} function parse(string){if(!string||typeof string!=="string"){throw new TypeError("argument string is required");} let match=DISPOSITION_TYPE_REGEXP.exec(string);if(!match){throw new TypeError("invalid type format");} let index=match[0].length;const type=match[1].toLowerCase();let key;const names=[];const params={};let value;index=PARAM_REGEXP.lastIndex=match[0].substr(-1)===";"?index-1:index;while((match=PARAM_REGEXP.exec(string))){if(match.index!==index){throw new TypeError("invalid parameter format");} index+=match[0].length;key=match[1].toLowerCase();value=match[2];if(names.indexOf(key)!==-1){throw new TypeError("invalid duplicate parameter");} names.push(key);if(key.indexOf("*")+1===key.length){key=key.slice(0,-1);value=decodefield(value);params[key]=value;continue;} if(typeof params[key]==="string"){continue;} if(value[0]==='"'){value=value.substr(1,value.length-2).replace(QESC_REGEXP,"$1");} params[key]=value;} if(index!==-1&&index!==string.length){throw new TypeError("invalid parameter format");} return new ContentDisposition(type,params);} function pdecode(str,hex){return String.fromCharCode(parseInt(hex,16));} function ContentDisposition(type,parameters){this.type=type;this.parameters=parameters;} function _download(data,filename,mimetype){let self=window,defaultMime="application/octet-stream",mimeType=mimetype||defaultMime,payload=data,url=!filename&&!mimetype&&payload,anchor=document.createElement("a"),toString=function(a){return String(a);},myBlob=self.Blob||self.MozBlob||self.WebKitBlob||toString,fileName=filename||"download",blob,reader;myBlob=myBlob.call?myBlob.bind(self):Blob;if(String(this)==="true"){payload=[payload,mimeType];mimeType=payload[0];payload=payload[1];} if(url&&url.length<2048){fileName=url.split("/").pop().split("?")[0];anchor.href=url;if(anchor.href.indexOf(url)!==-1){let ajax=new XMLHttpRequest();ajax.open("GET",url,true);ajax.responseType="blob";ajax.onload=function(e){_download(e.target.response,fileName,defaultMime);};setTimeout(()=>{ajax.send();},0);return ajax;}} if(/^data:[\w+\-]+\/[\w+\-]+[,;]/.test(payload)){if(payload.length>1024*1024*1.999&&myBlob!==toString){payload=dataUrlToBlob(payload);mimeType=payload.type||defaultMime;}else{return navigator.msSaveBlob?navigator.msSaveBlob(dataUrlToBlob(payload),fileName):saver(payload);}} blob=payload instanceof myBlob?payload:new myBlob([payload],{type:mimeType});function dataUrlToBlob(strUrl){let parts=strUrl.split(/[:;,]/),type=parts[1],decoder=parts[2]==="base64"?atob:decodeURIComponent,binData=decoder(parts.pop()),mx=binData.length,i=0,uiArr=new Uint8Array(mx);for(i;i{anchor.click();document.body.removeChild(anchor);if(winMode===true){setTimeout(()=>{self.URL.revokeObjectURL(anchor.href);},250);}},66);return true;} if(/(Version)\/(\d+)\.(\d+)(?:\.(\d+))?.*Safari\//.test(navigator.userAgent)){url=url.replace(/^data:([\w\/\-+]+)/,defaultMime);if(!window.open(url)){if(confirm("Displaying New Document\n\nUse Save As... to download, then click back to return to this page.")){location.href=url;}} return true;} let f=document.createElement("iframe");document.body.appendChild(f);if(!winMode){url=`data:${url.replace(/^data:([\w\/\-+]+)/, defaultMime)}`;} f.src=url;setTimeout(()=>{document.body.removeChild(f);},333);} if(navigator.msSaveBlob){return navigator.msSaveBlob(blob,fileName);} if(self.URL){saver(self.URL.createObjectURL(blob),true);}else{if(typeof blob==="string"||blob.constructor===toString){try{return saver(`data:${mimeType};base64,${self.btoa(blob)}`);}catch(y){return saver(`data:${mimeType},${encodeURIComponent(blob)}`);}} reader=new FileReader();reader.onload=function(){saver(this.result);};reader.readAsDataURL(blob);} return true;} __exports.download=download;function download(options){return download._download(options);} download._download=(options)=>{return new Promise((resolve,reject)=>{const xhr=new browser.XMLHttpRequest();let data;if(Object.prototype.hasOwnProperty.call(options,"form")){xhr.open(options.form.method,options.form.action);data=new FormData(options.form);}else{xhr.open("POST",options.url);data=new FormData();Object.entries(options.data).forEach((entry)=>{const[key,value]=entry;data.append(key,value);});} data.append("token","dummy-because-api-expects-one");if(odoo.csrf_token){data.append("csrf_token",odoo.csrf_token);} xhr.responseType="blob";xhr.onload=()=>{const mimetype=xhr.response.type;if(xhr.status===200&&mimetype!=="text/html"){const header=(xhr.getResponseHeader("Content-Disposition")||"").replace(/;$/,"");const filename=header?parse(header).parameters.filename:null;_download(xhr.response,filename,mimetype);return resolve(filename);}else if(xhr.status===502){reject(new ConnectionLostError());}else{const decoder=new FileReader();decoder.onload=()=>{const contents=decoder.result;const doc=new DOMParser().parseFromString(contents,"text/html");const nodes=doc.body.children.length===0?doc.body.childNodes:doc.body.children;let error;try{const node=nodes[1]||nodes[0];error=JSON.parse(node.textContent);}catch(e){error={message:"Arbitrary Uncaught Python Exception",data:{debug:`${xhr.status}`+`\n`+`${nodes.length > 0 ? nodes[0].textContent : ""} ${nodes.length > 1 ? nodes[1].textContent : ""}`},};} error=makeErrorFromResponse(error);reject(error);};decoder.readAsText(xhr.response);}};xhr.onerror=()=>{reject(new ConnectionLostError());};xhr.send(data);});};return __exports;});; /* /web/static/src/core/network/http_service.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/network/http_service',async function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");function checkResponseStatus(response){if(response.status===502){throw new Error("Failed to fetch");}} const httpService=__exports.httpService={start(){return{async get(route,readMethod="json"){const response=await fetch(route,{method:"GET"});checkResponseStatus(response);return response[readMethod]();},async post(route,params={},readMethod="json"){const formData=new FormData();for(const key in params){const value=params[key];if(Array.isArray(value)&&value.length){for(const val of value){formData.append(key,val);}}else{formData.append(key,value);}} const info={body:formData,method:"POST",};const response=await fetch(route,info);checkResponseStatus(response);return response[readMethod]();},};},};registry.category("services").add("http",httpService);return __exports;});; /* /web/static/src/core/network/rpc_service.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/network/rpc_service',async function(require){'use strict';let __exports={};const{browser}=require("@web/core/browser/browser");const{registry}=require("@web/core/registry");const RPCError=__exports.RPCError=class RPCError extends Error{constructor(){super(...arguments);this.name="RPC_ERROR";this.type="server";this.code=null;this.data=null;this.exceptionName=null;this.subType=null;}} const ConnectionLostError=__exports.ConnectionLostError=class ConnectionLostError extends Error{} const ConnectionAbortedError=__exports.ConnectionAbortedError=class ConnectionAbortedError extends Error{} __exports.makeErrorFromResponse=makeErrorFromResponse;function makeErrorFromResponse(reponse){const{code,data:errorData,message,type:subType}=reponse;const error=new RPCError();error.exceptionName=errorData.name;error.subType=subType;error.data=errorData;error.message=message;error.code=code;return error;} __exports.jsonrpc=jsonrpc;function jsonrpc(env,rpcId,url,params,settings={}){const bus=env.bus;const XHR=browser.XMLHttpRequest;const data={id:rpcId,jsonrpc:"2.0",method:"call",params:params,};const request=settings.xhr||new XHR();let rejectFn;const promise=new Promise((resolve,reject)=>{rejectFn=reject;if(!settings.silent){bus.trigger("RPC:REQUEST",data.id);} request.addEventListener("load",()=>{if(request.status===502){if(!settings.silent){bus.trigger("RPC:RESPONSE",data.id);} reject(new ConnectionLostError());return;} const{error:responseError,result:responseResult}=JSON.parse(request.response);if(!settings.silent){bus.trigger("RPC:RESPONSE",data.id);} if(!responseError){return resolve(responseResult);} const error=makeErrorFromResponse(responseError);reject(error);});request.addEventListener("error",()=>{if(!settings.silent){bus.trigger("RPC:RESPONSE",data.id);} reject(new ConnectionLostError());});request.open("POST",url);request.setRequestHeader("Content-Type","application/json");request.send(JSON.stringify(data));});promise.abort=function(){if(request.abort){request.abort();} rejectFn(new ConnectionAbortedError("XmlHttpRequestError abort"));};return promise;} const rpcService=__exports.rpcService={async:true,start(env){let rpcId=0;return function rpc(route,params={},settings){return jsonrpc(env,rpcId++,route,params,settings);};},};registry.category("services").add("rpc",rpcService);return __exports;});; /* /web/static/src/core/notifications/notification.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/notifications/notification',async function(require){'use strict';let __exports={};const{Component,hooks}=owl;const Notification=__exports.Notification=class Notification extends Component{setup(){if(this.props.onClose){hooks.onWillUnmount(()=>this.props.onClose());}} shouldUpdate(){return false;} get className(){let className;switch(this.props.type){case"danger":className="bg-danger";break;case"warning":className="bg-warning";break;case"success":className="bg-success";break;case"info":className="bg-info";break;} return className?`${className} ${this.props.className}`:this.props.className;}} Notification.template="web.NotificationWowl";Notification.props={message:{validate:(m)=>{return(typeof m==="string"||(typeof m==="object"&&typeof m.toString==="function"));}},title:{type:[String,Boolean,{toString:Function}],optional:true},type:{type:String,optional:true,validate:(t)=>["warning","danger","success","info"].includes(t)},messageIsHtml:{type:Boolean,optional:true},className:{type:String,optional:true},buttons:{type:Array,element:{type:Object,shape:{name:{type:String},icon:{type:String,optional:true},primary:{type:Boolean,optional:true},onClick:Function}}},onClose:{type:Function,optional:true}};Notification.defaultProps={buttons:[],className:"",messageIsHtml:false,type:"warning"};return __exports;});; /* /web/static/src/core/notifications/notification_container.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/notifications/notification_container',async function(require){'use strict';let __exports={};const{Notification}=require("@web/core/notifications/notification");const{Component,tags}=owl;const NotificationContainer=__exports.NotificationContainer=class NotificationContainer extends Component{setup(){this.props.bus.on("UPDATE",this,this.render);}} NotificationContainer.template=tags.xml`
`;NotificationContainer.components={Notification};return __exports;});; /* /web/static/src/core/notifications/notification_service.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/notifications/notification_service',async function(require){'use strict';let __exports={};const{browser}=require("@web/core/browser/browser");const{registry}=require("@web/core/registry");const{NotificationContainer}=require("@web/core/notifications/notification_container");const{EventBus}=owl.core;const AUTOCLOSE_DELAY=4000;const notificationService=__exports.notificationService={start(){let notifId=0;let notifications=[];const bus=new EventBus();registry.category("main_components").add("NotificationContainer",{Component:NotificationContainer,props:{bus,notifications},});function add(message,options={}){const id=++notifId;const props=Object.assign({},options,{message});const sticky=props.sticky;delete props.sticky;const closeFn=()=>close(id);const notification={id,props,close:closeFn,};notifications.push(notification);bus.trigger("UPDATE");if(!sticky){browser.setTimeout(closeFn,AUTOCLOSE_DELAY);} return closeFn;} function close(id){const index=notifications.findIndex((n)=>n.id===id);if(index>-1){notifications.splice(index,1);bus.trigger("UPDATE");}} return{add};},};registry.category("services").add("notification",notificationService);return __exports;});; /* /web/static/src/core/orm_service.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/orm_service',async function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");function assignOptions(kwargs,options,whileList){for(let elem of whileList){if(elem in options){kwargs[elem]=options[elem];}}} const Commands=__exports.Commands={create(virtualID,values){delete values.id;return[0,virtualID||false,values];},update(id,values){delete values.id;return[1,id,values];},delete(id){return[2,id,false];},forget(id){return[3,id,false];},linkTo(id){return[4,id,false];},deleteAll(){return[5,false,false];},replaceWith(ids){return[6,false,ids];},};function validateModel(value){if(typeof value!=="string"||value.length===0){throw new Error(`Invalid model name: ${value}`);}} function validatePrimitiveList(name,type,value){if(!Array.isArray(value)||value.some((val)=>typeof val!==type)){throw new Error(`Invalid ${name} list: ${value}`);}} function validateObject(name,obj){if(typeof obj!=="object"||obj===null||Array.isArray(obj)){throw new Error(`${name} should be an object`);}} function validateArray(name,array){if(!Array.isArray(array)){throw new Error(`${name} should be an array`);}} const ORM=__exports.ORM=class ORM{constructor(rpc,user){this.rpc=rpc;this.user=user;this._silent=false;} get silent(){return Object.assign(Object.create(this),{_silent:true});} call(model,method,args=[],kwargs={}){validateModel(model);let url=`/web/dataset/call_kw/${model}/${method}`;const fullContext=Object.assign({},this.user.context,kwargs.context||{});const fullKwargs=Object.assign({},kwargs,{context:fullContext});let params={model,method,args,kwargs:fullKwargs,};return this.rpc(url,params,{silent:this._silent});} create(model,state,ctx){validateObject("state",state);return this.call(model,"create",[state],{context:ctx});} read(model,ids,fields,ctx){validatePrimitiveList("ids","number",ids);if(fields){validatePrimitiveList("fields","string",fields);} if(!ids.length){return Promise.resolve([]);} return this.call(model,"read",[ids,fields],{context:ctx});} readGroup(model,domain,fields,groupby,options={},ctx={}){validateArray("domain",domain);validatePrimitiveList("fields","string",fields);validatePrimitiveList("groupby","string",groupby);const kwargs={domain,groupby,fields,context:ctx,};assignOptions(kwargs,options,["lazy","offset","orderby","limit"]);return this.call(model,"read_group",[],kwargs);} search(model,domain,options={},ctx={}){validateArray("domain",domain);const kwargs={context:ctx,};assignOptions(kwargs,options,["offset","limit","order"]);return this.call(model,"search",[domain],kwargs);} searchRead(model,domain,fields,options={},ctx={}){validateArray("domain",domain);if(fields){validatePrimitiveList("fields","string",fields);} const kwargs={context:ctx,domain,fields};assignOptions(kwargs,options,["offset","limit","order"]);return this.call(model,"search_read",[],kwargs);} unlink(model,ids,ctx){validatePrimitiveList("ids","number",ids);if(!ids.length){return true;} return this.call(model,"unlink",[ids],{context:ctx});} webReadGroup(model,domain,fields,groupby,options={},ctx={}){validateArray("domain",domain);validatePrimitiveList("fields","string",fields);validatePrimitiveList("groupby","string",groupby);const kwargs={domain,groupby,fields,context:ctx,};assignOptions(kwargs,options,["lazy","offset","orderby","limit"]);return this.call(model,"web_read_group",[],kwargs);} webSearchRead(model,domain,fields,options={},ctx={}){validateArray("domain",domain);validatePrimitiveList("fields","string",fields);const kwargs={context:ctx,domain,fields};assignOptions(kwargs,options,["offset","limit","order"]);return this.call(model,"web_search_read",[],kwargs);} write(model,ids,data,ctx){validatePrimitiveList("ids","number",ids);validateObject("data",data);return this.call(model,"write",[ids,data],{context:ctx});}} const ormService=__exports.ormService={dependencies:["rpc","user"],async:["call","create","read","readGroup","search","searchRead","unlink","web_search_read","write",],start(env,{rpc,user}){return new ORM(rpc,user);},};registry.category("services").add("orm",ormService);return __exports;});; /* /web/static/src/core/popover/popover.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/popover/popover',async function(require){'use strict';let __exports={};const{usePosition}=require("@web/core/position/position_hook");const{Component}=owl;const Popover=__exports.Popover=class Popover extends Component{setup(){usePosition(this.props.target,{margin:16,position:this.props.position,});}} Popover.template="web.PopoverWowl";Popover.defaultProps={position:"bottom",};Popover.props={popoverClass:{optional:true,type:String,},position:{type:String,validate:(p)=>["top","bottom","left","right"].includes(p),},target:HTMLElement,};return __exports;});; /* /web/static/src/core/popover/popover_container.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/popover/popover_container',async function(require){'use strict';let __exports={};const{Popover}=require("@web/core/popover/popover");const{Component}=owl;const{useExternalListener,useState}=owl.hooks;const{xml}=owl.tags;class PopoverController extends Component{setup(){this.state=useState({displayed:false});this.targetObserver=new MutationObserver(this.onTargetMutate.bind(this));useExternalListener(window,"click",this.onClickAway,{capture:true});} mounted(){this.targetObserver.observe(this.target.parentElement,{childList:true});} willUnmount(){this.targetObserver.disconnect();} shouldUpdate(){return false;} get popoverProps(){return{target:this.target,position:this.props.position,popoverClass:this.props.popoverClass,};} get target(){if(typeof this.props.target==="string"){return document.querySelector(this.props.target);}else{return this.props.target;}} onClickAway(ev){if(this.target.contains(ev.target)||ev.target.closest(".o_popover")){return;} if(this.props.closeOnClickAway){this.props.close();}} onTargetMutate(){const target=this.target;if(!target||!target.parentElement){this.props.close();}}} PopoverController.components={Popover};PopoverController.defaultProps={alwaysDisplayed:false,closeOnClickAway:true,};PopoverController.template=xml` `;const PopoverContainer=__exports.PopoverContainer=class PopoverContainer extends Component{setup(){this.props.bus.on("UPDATE",this,this.render);}} PopoverContainer.components={PopoverController};PopoverContainer.template=xml`
`;return __exports;});; /* /web/static/src/core/popover/popover_hook.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/popover/popover_hook',async function(require){'use strict';let __exports={};const{useService}=require("@web/core/utils/hooks");const{onWillUnmount,useComponent}=owl.hooks;__exports.usePopover=usePopover;function usePopover(){const removeFns=new Set();const service=useService("popover");const component=useComponent();onWillUnmount(function(){for(const removeFn of removeFns){removeFn();} removeFns.clear();});return{add(target,Component,props,options={}){const newOptions=Object.create(options);newOptions.onClose=function(){removeFns.delete(removeFn);if(options.onClose&&component.__owl__.status!==5){options.onClose();}};const removeFn=service.add(target,Component,props,newOptions);removeFns.add(removeFn);return removeFn;},};} return __exports;});; /* /web/static/src/core/popover/popover_service.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/popover/popover_service',async function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{PopoverContainer}=require("@web/core/popover/popover_container");const{EventBus}=owl.core;const popoverService=__exports.popoverService={start(){let nextId=0;const popovers={};const bus=new EventBus();registry.category("main_components").add("PopoverContainer",{Component:PopoverContainer,props:{bus,popovers}});function add(target,Component,props,options={}){const id=++nextId;const closeFn=()=>close(id);const popover={id,target,Component,props,close:closeFn,onClose:options.onClose,position:options.position,popoverClass:options.popoverClass,closeOnClickAway:options.closeOnClickAway,};popovers[id]=popover;bus.trigger("UPDATE");return closeFn;} function close(id){if(id in popovers){const popover=popovers[id];if(popover.onClose){popover.onClose();} delete popovers[id];bus.trigger("UPDATE");}} return{add};},};registry.category("services").add("popover",popoverService);return __exports;});; /* /web/static/src/core/position/position_hook.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/position/position_hook',async function(require){'use strict';let __exports={};const{useEffect}=require("@web/core/utils/hooks");const{throttleForAnimation}=require("@web/core/utils/timing");const{onWillUnmount}=owl.hooks;const{hooks}=owl;const{useComponent,useExternalListener,useRef}=hooks;const POPPER_CLASS="o-popper-position";const DIRECTION_FLIP_ORDER={top:"tbrl",right:"rltb",bottom:"btrl",left:"lrbt"};const VARIANT_FLIP_ORDER={start:"sme",middle:"mse",end:"ems"};const DEFAULTS=__exports.DEFAULTS={margin:0,position:"bottom",};__exports.computePositioning=computePositioning;function computePositioning(reference,popper,options){const{container,margin,position}=options;const[directionKey,variantKey="middle"]=position.split("-");const directions=DIRECTION_FLIP_ORDER[directionKey];const variants=VARIANT_FLIP_ORDER[variantKey];const popBox=popper.getBoundingClientRect();const refBox=reference.getBoundingClientRect();const contBox=container.getBoundingClientRect();const containerIsHTMLNode=container===document.firstElementChild;const directionsData={t:refBox.top-popBox.height-margin,b:refBox.bottom+margin,r:refBox.right+margin,l:refBox.left-popBox.width-margin,};const variantsData={vs:refBox.left,vm:refBox.left+refBox.width/2+-popBox.width/2,ve:refBox.right-popBox.width,hs:refBox.top,hm:refBox.top+refBox.height/2+-popBox.height/2,he:refBox.bottom-popBox.height,};function get(d=directions[0],v=variants[0],containerRestricted=false){const vertical=["t","b"].includes(d);const variantPrefix=vertical?"v":"h";const directionValue=directionsData[d];const variantValue=variantsData[variantPrefix+v];if(containerRestricted){const[directionSize,variantSize]=vertical?[popBox.height+margin,popBox.width]:[popBox.width,popBox.height+margin];let[directionMin,directionMax]=vertical?[contBox.top,contBox.bottom]:[contBox.left,contBox.right];let[variantMin,variantMax]=vertical?[contBox.left,contBox.right]:[contBox.top,contBox.bottom];if(containerIsHTMLNode){if(vertical){directionMin+=container.scrollTop;directionMax+=container.scrollTop;}else{variantMin+=container.scrollTop;variantMax+=container.scrollTop;}} const directionOverflow=directionValuedirectionMax;const variantOverflow=variantValuevariantMax;if(directionOverflow||variantOverflow){return null;}} const positioning=vertical?{top:directionValue,left:variantValue,}:{top:variantValue,left:directionValue,};return{...positioning,className:`${POPPER_CLASS}--${d}${v}`};} return{directions,variants,get,};} function reposition(reference,popper,options){options={container:document.documentElement,...DEFAULTS,...options,};for(const popperClass of popper.classList){if(popperClass.startsWith(POPPER_CLASS)){popper.classList.remove(popperClass);}} popper.classList.add(POPPER_CLASS);const positioning=computePositioning(reference,popper,options);for(const d of positioning.directions){for(const v of positioning.variants){const posData=positioning.get(d,v,true);if(!posData){continue;} const{className,top,left}=posData;popper.classList.add(className);popper.style.top=`${top}px`;popper.style.left=`${left}px`;return;}} const{className,top,left}=positioning.get();popper.classList.add(className);popper.style.top=`${top}px`;popper.style.left=`${left}px`;} __exports.usePosition=usePosition;function usePosition(reference,options){options={...DEFAULTS,...options};const{popper}=options;const popperRef=popper?useRef(popper):useComponent();const getReference=reference instanceof HTMLElement?()=>reference:reference;const update=()=>{const ref=getReference();if(popperRef.el&&ref){reposition(ref,popperRef.el,options);}};useEffect(update);const throttledUpdate=throttleForAnimation(update);useExternalListener(document,"scroll",throttledUpdate,{capture:true});useExternalListener(window,"resize",throttledUpdate);onWillUnmount(throttledUpdate.cancel);} return __exports;});; /* /web/static/src/core/py_js/py.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/py_js/py',async function(require){'use strict';let __exports={};const{evaluate}=require("@web/core/py_js/py_interpreter");const{parse}=require("@web/core/py_js/py_parser");const{tokenize}=require("@web/core/py_js/py_tokenizer");{const{evaluate}=require("@web/core/py_js/py_interpreter");Object.assign(__exports,{evaluate})};{const{parse}=require("@web/core/py_js/py_parser");Object.assign(__exports,{parse})};{const{tokenize}=require("@web/core/py_js/py_tokenizer");Object.assign(__exports,{tokenize})};{const{formatAST}=require("@web/core/py_js/py_utils");Object.assign(__exports,{formatAST})};__exports.parseExpr=parseExpr;function parseExpr(expr){const tokens=tokenize(expr);return parse(tokens);} __exports.evaluateExpr=evaluateExpr;function evaluateExpr(expr,context={}){const ast=parseExpr(expr);return evaluate(ast,context);} return __exports;});; /* /web/static/src/core/py_js/py_builtin.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/py_js/py_builtin',async function(require){'use strict';let __exports={};const{PyDate,PyDateTime,PyRelativeDelta,PyTime,PyTimeDelta}=require("@web/core/py_js/py_date");const BUILTINS=__exports.BUILTINS={bool(value){switch(typeof value){case"number":return value!==0;case"string":return value!=="";case"boolean":return value;case"object":if(value===null){return false;} if(value.isTrue){return value.isTrue();} return true;} return true;},time:{strftime(format){return PyDateTime.now().strftime(format);},},context_today(){return PyDate.today();},get current_date(){return this.today;},get today(){return PyDate.today().strftime("%Y-%m-%d");},get now(){return PyDateTime.now().strftime("%Y-%m-%d %H:%M:%S");},datetime:{time:PyTime,timedelta:PyTimeDelta,datetime:PyDateTime,date:PyDate,},relativedelta:PyRelativeDelta,};return __exports;});; /* /web/static/src/core/py_js/py_date.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/py_js/py_date',async function(require){'use strict';let __exports={};const{parseArgs}=require("@web/core/py_js/py_utils");const AssertionError=__exports.AssertionError=class AssertionError extends Error{} const ValueError=__exports.ValueError=class ValueError extends Error{} const NotSupportedError=__exports.NotSupportedError=class NotSupportedError extends Error{} function fmt2(n){return String(n).padStart(2,"0");} function fmt4(n){return String(n).padStart(4,"0");} function divmod(a,b,fn){let mod=a%b;if((mod>0&&b<0)||(mod<0&&b>0)){mod+=b;} return fn(Math.floor(a/b),mod);} function assert(bool,message="AssertionError"){if(!bool){throw new AssertionError(message);}} const DAYS_IN_MONTH=[null,31,28,31,30,31,30,31,31,30,31,30,31];const DAYS_BEFORE_MONTH=[null];for(let dbm=0,i=1;i2&&isLeap(year);return DAYS_BEFORE_MONTH[month]+(postLeapFeb?1:0);} function ymd2ord(year,month,day){const dim=daysInMonth(year,month);if(!(1<=day&&day<=dim)){throw new ValueError(`day must be in 1..${dim}`);} return daysBeforeYear(year)+daysBeforeMonth(year,month)+day;} const DI400Y=daysBeforeYear(401);const DI100Y=daysBeforeYear(101);const DI4Y=daysBeforeYear(5);function ord2ymd(n){--n;let n400,n100,n4,n1,n0;divmod(n,DI400Y,function(_n400,n){n400=_n400;divmod(n,DI100Y,function(_n100,n){n100=_n100;divmod(n,DI4Y,function(_n4,n){n4=_n4;divmod(n,365,function(_n1,n){n1=_n1;n0=n;});});});});n=n0;const year=n400*400+1+n100*100+n4*4+n1;if(n1==4||n100==100){assert(n0===0);return{year:year-1,month:12,day:31,};} let leapyear=n1===3&&(n4!==24||n100==3);assert(leapyear==isLeap(year));let month=(n+50)>>5;let preceding=DAYS_BEFORE_MONTH[month]+(month>2&&leapyear?1:0);if(preceding>n){--month;preceding-=DAYS_IN_MONTH[month]+(month===2&&leapyear?1:0);} n-=preceding;return{year:year,month:month,day:n+1,};} function tmxxx(year,month,day,hour,minute,second,microsecond){hour=hour||0;minute=minute||0;second=second||0;microsecond=microsecond||0;if(microsecond<0||microsecond>999999){divmod(microsecond,1000000,function(carry,ms){microsecond=ms;second+=carry;});} if(second<0||second>59){divmod(second,60,function(carry,s){second=s;minute+=carry;});} if(minute<0||minute>59){divmod(minute,60,function(carry,m){minute=m;hour+=carry;});} if(hour<0||hour>23){divmod(hour,24,function(carry,h){hour=h;day+=carry;});} if(month<1||month>12){divmod(month-1,12,function(carry,m){month=m+1;year+=carry;});} let dim=daysInMonth(year,month);if(day<1||day>dim){if(day===0){--month;if(month>0){day=daysInMonth(year,month);}else{--year;month=12;day=31;}}else if(day==dim+1){++month;day=1;if(month>12){month=1;++year;}}else{let r=ord2ymd(ymd2ord(year,month,1)+(day-1));year=r.year;month=r.month;day=r.day;}} return{year:year,month:month,day:day,hour:hour,minute:minute,second:second,microsecond:microsecond,};} const PyDate=__exports.PyDate=class PyDate{static today(){const now=new Date();const year=now.getUTCFullYear();const month=now.getUTCMonth()+1;const day=now.getUTCDate();return new PyDate(year,month,day);} constructor(year,month,day){this.year=year;this.month=month;this.day=day;} static create(...args){const{year,month,day}=parseArgs(args,["year","month","day"]);return new PyDate(year,month,day);} add(timedelta){const s=tmxxx(this.year,this.month,this.day+timedelta.days);return new PyDate(s.year,s.month,s.day);} isEqual(other){if(!(other instanceof PyDate)){return false;} return this.year===other.year&&this.month===other.month&&this.day===other.day;} strftime(format){return format.replace(/%([A-Za-z])/g,(m,c)=>{switch(c){case"Y":return fmt4(this.year);case"m":return fmt2(this.month);case"d":return fmt2(this.day);} throw new ValueError(`No known conversion for ${m}`);});} substract(other){if(other instanceof PyTimeDelta){return this.add(other.negate());} if(other instanceof PyDate){return PyTimeDelta.create(this.toordinal()-other.toordinal());} throw NotSupportedError();} toJSON(){return this.strftime("%Y-%m-%d");} toordinal(){return ymd2ord(this.year,this.month,this.day);}} const PyDateTime=__exports.PyDateTime=class PyDateTime{static now(){const now=new Date();const year=now.getUTCFullYear();const month=now.getUTCMonth()+1;const day=now.getUTCDate();const hour=now.getUTCHours();const minute=now.getUTCMinutes();const second=now.getUTCSeconds();return new PyDateTime(year,month,day,hour,minute,second,0);} static create(...args){const namedArgs=parseArgs(args,["year","month","day","hour","minute","second","microsecond",]);const year=namedArgs.year;const month=namedArgs.month;const day=namedArgs.day;const hour=namedArgs.hour||0;const minute=namedArgs.minute||0;const second=namedArgs.second||0;const ms=namedArgs.micro/1000||0;return new PyDateTime(year,month,day,hour,minute,second,ms);} static combine(...args){const{date,time}=parseArgs(args,["date","time"]);return PyDateTime.create(date.year,date.month,date.day,time.hour,time.minute,time.second);} constructor(year,month,day,hour,minute,second,microsecond){this.year=year;this.month=month;this.day=day;this.hour=hour;this.minute=minute;this.second=second;this.microsecond=microsecond;} add(timedelta){const s=tmxxx(this.year,this.month,this.day+timedelta.days,this.hour,this.minute,this.second+timedelta.seconds,this.microsecond+timedelta.microseconds);return new PyDateTime(s.year,s.month,s.day,s.hour,s.minute,s.second,s.microsecond);} isEqual(other){if(!(other instanceof PyDateTime)){return false;} return(this.year===other.year&&this.month===other.month&&this.day===other.day&&this.hour===other.hour&&this.minute===other.minute&&this.second===other.second&&this.microsecond===other.microsecond);} strftime(format){return format.replace(/%([A-Za-z])/g,(m,c)=>{switch(c){case"Y":return fmt4(this.year);case"m":return fmt2(this.month);case"d":return fmt2(this.day);case"H":return fmt2(this.hour);case"M":return fmt2(this.minute);case"S":return fmt2(this.second);} throw new ValueError(`No known conversion for ${m}`);});} substract(timedelta){return this.add(timedelta.negate());} toJSON(){return this.strftime("%Y-%m-%d %H:%M:%S");} to_utc(){const d=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);const timedelta=PyTimeDelta.create({minutes:d.getTimezoneOffset()});return this.add(timedelta);}} const PyTime=__exports.PyTime=class PyTime extends PyDate{static create(...args){const namedArgs=parseArgs(args,["hour","minute","second"]);const hour=namedArgs.hour||0;const minute=namedArgs.minute||0;const second=namedArgs.second||0;return new PyTime(hour,minute,second);} constructor(hour,minute,second){const now=new Date();const year=now.getFullYear();const month=now.getUTCMonth();const day=now.getUTCDate();super(year,month,day);this.hour=hour;this.minute=minute;this.second=second;} strftime(format){return format.replace(/%([A-Za-z])/g,(m,c)=>{switch(c){case"Y":return fmt4(this.year);case"m":return fmt2(this.month+1);case"d":return fmt2(this.day);case"H":return fmt2(this.hour);case"M":return fmt2(this.minute);case"S":return fmt2(this.second);} throw new ValueError(`No known conversion for ${m}`);});} toJSON(){return this.strftime("%H:%M:%S");}} const DAYS_IN_YEAR=[31,59,90,120,151,181,212,243,273,304,334,366];const TIME_PERIODS=["hour","minute","second"];const PERIODS=["year","month","day",...TIME_PERIODS];const RELATIVE_KEYS="years months weeks days hours minutes seconds microseconds leapdays".split(" ");const ABSOLUTE_KEYS="year month day hour minute second microsecond weekday nlyearday yearday".split(" ");const argsSpec=["dt1","dt2"];const PyRelativeDelta=__exports.PyRelativeDelta=class PyRelativeDelta{static create(...args){const params=parseArgs(args,argsSpec);if("dt1"in params){throw new Error("relativedelta(dt1, dt2) is not supported for now");} for(const period of PERIODS){if(period in params){const val=params[period];assert(val>=0,`${period} ${val} is out of range`);}} for(const key of RELATIVE_KEYS){params[key]=params[key]||0;} for(const key of ABSOLUTE_KEYS){params[key]=key in params?params[key]:null;} params.days+=7*params.weeks;let yearDay=0;if(params.nlyearday){yearDay=params.nlyearday;}else if(params.yearday){yearDay=params.yearday;if(yearDay>59){params.leapDays=-1;}} if(yearDay){for(let monthIndex=0;monthIndex2&&isLeap(newDateTime.year)){leapDays=delta.leapDays;} const temp=newDateTime.add(PyTimeDelta.create({days:delta.days+leapDays,hours:delta.hours,minutes:delta.minutes,seconds:delta.seconds,microseconds:delta.microseconds,}));const hasTime=Boolean(temp.hour||temp.minute||temp.second||temp.microsecond);const returnDate=!hasTime&&date instanceof PyDate?new PyDate(temp.year,temp.month,temp.day):temp;if(delta.weekday!==null){const wantedDow=delta.weekday+1;const _date=new Date(returnDate.year,returnDate.month-1,returnDate.day);const days=(7-_date.getDay()+wantedDow)%7;return returnDate.add(new PyTimeDelta(days,0,0));} return returnDate;} static substract(date,delta){return PyRelativeDelta.add(date,delta.negate());} constructor(params={},sign=+1){this.years=sign*params.years;this.months=sign*params.months;this.days=sign*params.days;this.hours=sign*params.hours;this.minutes=sign*params.minutes;this.seconds=sign*params.seconds;this.microseconds=sign*params.microseconds;this.leapDays=params.leapDays;this.year=params.year;this.month=params.month;this.day=params.day;this.hour=params.hour;this.minute=params.minute;this.second=params.second;this.microsecond=params.microsecond;this.weekday=params.weekday;} negate(){return new PyRelativeDelta(this,-1);} isEqual(other){throw new NotSupportedError();}} const TIME_DELTA_KEYS="weeks days hours minutes seconds milliseconds microseconds".split(" ");function modf(x){const mod=x%1;return[mod<0?mod+1:mod,Math.floor(x)];} const PyTimeDelta=__exports.PyTimeDelta=class PyTimeDelta{static create(...args){const namedArgs=parseArgs(args,["days","seconds","microseconds"]);for(const key of TIME_DELTA_KEYS){namedArgs[key]=namedArgs[key]||0;} let d=0;let s=0;let us=0;const days=namedArgs.days+namedArgs.weeks*7;let seconds=namedArgs.seconds+60*namedArgs.minutes+3600*namedArgs.hours;let microseconds=namedArgs.microseconds+1000*namedArgs.milliseconds;const[dFrac,dInt]=modf(days);d=dInt;let daysecondsfrac=0;if(dFrac){const[dsFrac,dsInt]=modf(dFrac*24*3600);s=dsInt;daysecondsfrac=dsFrac;} const[sFrac,sInt]=modf(seconds);seconds=sInt;const secondsfrac=sFrac+daysecondsfrac;divmod(seconds,24*3600,(days,seconds)=>{d+=days;s+=seconds;});microseconds+=secondsfrac*1e6;divmod(microseconds,1000000,(seconds,microseconds)=>{divmod(seconds,24*3600,(days,seconds)=>{d+=days;s+=seconds;us+=Math.round(microseconds);});});return new PyTimeDelta(d,s,us);} constructor(days,seconds,microseconds){this.days=days;this.seconds=seconds;this.microseconds=microseconds;} add(other){return PyTimeDelta.create({days:this.days+other.days,seconds:this.seconds+other.seconds,microseconds:this.microseconds+other.microseconds,});} divide(n){const us=(this.days*24*3600+this.seconds)*1e6+this.microseconds;return PyTimeDelta.create({microseconds:Math.floor(us/n)});} isEqual(other){if(!(other instanceof PyTimeDelta)){return false;} return(this.days===other.days&&this.seconds===other.seconds&&this.microseconds===other.microseconds);} isTrue(){return this.days!==0||this.seconds!==0||this.microseconds!==0;} multiply(n){return PyTimeDelta.create({days:n*this.days,seconds:n*this.seconds,microseconds:n*this.microseconds,});} negate(){return PyTimeDelta.create({days:-this.days,seconds:-this.seconds,microseconds:-this.microseconds,});} substract(other){return PyTimeDelta.create({days:this.days-other.days,seconds:this.seconds-other.seconds,microseconds:this.microseconds-other.microseconds,});} total_seconds(){return this.days*86400+this.seconds+this.microseconds/1000000;}} return __exports;});; /* /web/static/src/core/py_js/py_interpreter.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/py_js/py_interpreter',async function(require){'use strict';let __exports={};const{BUILTINS}=require("@web/core/py_js/py_builtin");const{NotSupportedError,PyDate,PyDateTime,PyRelativeDelta,PyTime,PyTimeDelta,}=require("@web/core/py_js/py_date");const{parseArgs,PY_DICT,toPyDict}=require("@web/core/py_js/py_utils");const EvaluationError=__exports.EvaluationError=class EvaluationError extends Error{} const isTrue=BUILTINS.bool;function applyUnaryOp(ast,context){const value=evaluate(ast.right,context);switch(ast.op){case"-":if(value instanceof Object&&value.negate){return value.negate();} return-value;case"+":return value;case"not":return!isTrue(value);} throw new EvaluationError(`Unknown unary operator: ${ast.op}`);} function pytypeIndex(val){switch(typeof val){case"object":return val===null?1:Array.isArray(val)?5:3;case"number":return 2;case"string":return 4;} throw new EvaluationError(`Unknown type: ${typeof val}`);} function isConstructor(obj){return!!obj.prototype&&!!obj.prototype.constructor.name;} function isLess(left,right){if(typeof left==="number"&&typeof right==="number"){return left":case"!=":return!isEqual(left,right);case"<":return isLess(left,right);case">":return isLess(right,left);case">=":return isEqual(left,right)||isLess(right,left);case"<=":return isEqual(left,right)||isLess(left,right);case"in":return isIn(left,right);case"not in":return!isIn(left,right);} throw new EvaluationError(`Unknown binary operator: ${ast.op}`);} const DICT={get(dict){return(...args)=>{const{key,defValue}=parseArgs(args,["key","defValue"]);if(key in dict){return dict[key];}else if(defValue){return defValue;} return null;};},};__exports.evaluate=evaluate;function evaluate(ast,context={}){const dicts=new Set();let pyContext;const evalContext=Object.create(context);Object.defineProperty(evalContext,"context",{get(){if(!pyContext){pyContext=toPyDict(context);} return pyContext;},});function _evaluate(ast){switch(ast.type){case 0:case 1:return ast.value;case 5:if(ast.value in evalContext){return evalContext[ast.value];}else if(ast.value in BUILTINS){return BUILTINS[ast.value];}else{throw new EvaluationError(`Name '${ast.value}' is not defined`);} case 3:return null;case 2:return ast.value;case 6:return applyUnaryOp(ast,evalContext);case 7:return applyBinaryOp(ast,evalContext);case 14:const left=_evaluate(ast.left);if(ast.op==="and"){return isTrue(left)?_evaluate(ast.right):left;}else{return isTrue(left)?left:_evaluate(ast.right);} case 4:case 10:return ast.value.map(_evaluate);case 11:const dict={};for(let key in ast.value){dict[key]=_evaluate(ast.value[key]);} dicts.add(dict);return dict;case 8:const fnValue=_evaluate(ast.fn);const args=ast.args.map(_evaluate);const kwargs={};for(let kwarg in ast.kwargs){kwargs[kwarg]=_evaluate(ast.kwargs[kwarg]);} if(fnValue===PyDate||fnValue===PyDateTime||fnValue===PyTime||fnValue===PyRelativeDelta||fnValue===PyTimeDelta){return fnValue.create(...args,kwargs);} return fnValue(...args,kwargs);case 12:{const dict=_evaluate(ast.target);const key=_evaluate(ast.key);return dict[key];} case 13:{if(isTrue(_evaluate(ast.condition))){return _evaluate(ast.ifTrue);}else{return _evaluate(ast.ifFalse);}} case 15:{const left=_evaluate(ast.obj);if(dicts.has(left)||Object.isPrototypeOf.call(PY_DICT,left)){return DICT[ast.key](left);} const result=left[ast.key];if(typeof result==="function"&&!isConstructor(result)){return result.bind(left);} return result;}} throw new EvaluationError(`AST of type ${ast.type} cannot be evaluated`);} return _evaluate(ast);} return __exports;});; /* /web/static/src/core/py_js/py_parser.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/py_js/py_parser',async function(require){'use strict';let __exports={};const{binaryOperators,comparators}=require("@web/core/py_js/py_tokenizer");const ParserError=__exports.ParserError=class ParserError extends Error{} const chainedOperators=new Set(comparators);const infixOperators=new Set(binaryOperators.concat(comparators));__exports.bp=bp;function bp(symbol){switch(symbol){case"=":return 10;case"if":return 20;case"in":case"not in":case"is":case"is not":case"<":case"<=":case">":case">=":case"<>":case"==":case"!=":return 60;case"or":return 30;case"and":return 40;case"not":return 50;case"|":return 70;case"^":return 80;case"&":return 90;case"<<":case">>":return 100;case"+":case"-":return 110;case"*":case"/":case"//":case"%":return 120;case"**":return 140;case".":case"(":case"[":return 150;} return 0;} function bindingPower(token){return token.type===2?bp(token.value):0;} function isSymbol(token,value){return token.type===2&&token.value===value;} function parsePrefix(current,tokens){switch(current.type){case 0:return{type:0,value:current.value};case 1:return{type:1,value:current.value};case 4:if(current.value==="None"){return{type:3};}else{return{type:2,value:current.value==="True"};} case 3:return{type:5,value:current.value};case 2:switch(current.value){case"-":case"+":case"~":return{type:6,op:current.value,right:_parse(tokens,130),};case"not":return{type:6,op:current.value,right:_parse(tokens,50),};case"(":const content=[];let isTuple=false;while(tokens[0]&&!isSymbol(tokens[0],")")){content.push(_parse(tokens,0));if(tokens[0]){if(tokens[0]&&isSymbol(tokens[0],",")){isTuple=true;tokens.shift();}else if(!isSymbol(tokens[0],")")){throw new ParserError("parsing error");}}else{throw new ParserError("parsing error");}} if(!tokens[0]||!isSymbol(tokens[0],")")){throw new ParserError("parsing error");} tokens.shift();isTuple=isTuple||content.length===0;return isTuple?{type:10,value:content}:content[0];case"[":const value=[];while(tokens[0]&&!isSymbol(tokens[0],"]")){value.push(_parse(tokens,0));if(tokens[0]){if(isSymbol(tokens[0],",")){tokens.shift();}else if(!isSymbol(tokens[0],"]")){throw new ParserError("parsing error");}}} if(!tokens[0]||!isSymbol(tokens[0],"]")){throw new ParserError("parsing error");} tokens.shift();return{type:4,value};case"{":{const dict={};while(tokens[0]&&!isSymbol(tokens[0],"}")){const key=_parse(tokens,0);if((key.type!==1&&key.type!==0)||!tokens[0]||!isSymbol(tokens[0],":")){throw new ParserError("parsing error");} tokens.shift();const value=_parse(tokens,0);dict[key.value]=value;if(isSymbol(tokens[0],",")){tokens.shift();}} if(!tokens.shift()){throw new ParserError("parsing error");} return{type:11,value:dict};}}} throw new ParserError("Token cannot be parsed");} function parseInfix(left,current,tokens){switch(current.type){case 2:if(infixOperators.has(current.value)){let right=_parse(tokens,bindingPower(current));if(current.value==="and"||current.value==="or"){return{type:14,op:current.value,left,right,};}else if(current.value==="."){if(right.type===5){return{type:15,obj:left,key:right.value,};}else{throw new ParserError("invalid obj lookup");}} let op={type:7,op:current.value,left,right,};while(chainedOperators.has(current.value)&&tokens[0]&&tokens[0].type===2&&chainedOperators.has(tokens[0].value)){const nextToken=tokens.shift();op={type:14,op:"and",left:op,right:{type:7,op:nextToken.value,left:right,right:_parse(tokens,bindingPower(nextToken)),},};right=op.right.right;} return op;} switch(current.value){case"(":const args=[];const kwargs={};while(tokens[0]&&!isSymbol(tokens[0],")")){const arg=_parse(tokens,0);if(arg.type===9){kwargs[arg.name.value]=arg.value;}else{args.push(arg);} if(tokens[0]&&isSymbol(tokens[0],",")){tokens.shift();}} if(!tokens[0]||!isSymbol(tokens[0],")")){throw new ParserError("parsing error");} tokens.shift();return{type:8,fn:left,args,kwargs};case"=":if(left.type===5){return{type:9,name:left,value:_parse(tokens,10),};} case"[":{const key=_parse(tokens);if(!tokens[0]||!isSymbol(tokens[0],"]")){throw new ParserError("parsing error");} tokens.shift();return{type:12,target:left,key:key,};} case"if":{const condition=_parse(tokens);if(!tokens[0]||!isSymbol(tokens[0],"else")){throw new ParserError("parsing error");} tokens.shift();const ifFalse=_parse(tokens);return{type:13,condition,ifTrue:left,ifFalse,};}}} throw new ParserError("Token cannot be parsed");} function _parse(tokens,bp=0){const token=tokens.shift();let expr=parsePrefix(token,tokens);while(tokens[0]&&bindingPower(tokens[0])>bp){expr=parseInfix(expr,tokens.shift(),tokens);} return expr;} __exports.parse=parse;function parse(tokens){if(tokens.length){return _parse(tokens,0);} throw new ParserError("Missing token");} return __exports;});; /* /web/static/src/core/py_js/py_tokenizer.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/py_js/py_tokenizer',async function(require){'use strict';let __exports={};const TokenizerError=__exports.TokenizerError=class TokenizerError extends Error{} const directMap={"\\":"\\",'"':'"',"'":"'",a:"\x07",b:"\x08",f:"\x0c",n:"\n",r:"\r",t:"\t",v:"\v",};function decodeStringLiteral(str,unicode){let out=[];let code;for(var i=0;i",">=","<>","!=","==",];const binaryOperators=__exports.binaryOperators=["or","and","|","^","&","<<",">>","+","-","*","/","//","%","~","**",".",];const unaryOperators=__exports.unaryOperators=["-"];const symbols=new Set([...["(",")","[","]","{","}",":",","],...["if","else","lambda","="],...comparators,...binaryOperators,...unaryOperators,]);function group(...args){return"("+args.join("|")+")";} const Name="[a-zA-Z_]\\w*";const Whitespace="[ \\f\\t]*";const DecNumber="\\d+(L|l)?";const IntNumber=DecNumber;const PointFloat=group("\\d+\\.\\d*","\\.\\d+");const FloatNumber=PointFloat;const Number=group(FloatNumber,IntNumber);const Operator=group("\\*\\*=?",">>=?","<<=?","<>","!=","//=?","[+\\-*/%&|^=<>]=?","~");const Bracket="[\\[\\]\\(\\)\\{\\}]";const Special="[:;.,`@]";const Funny=group(Operator,Bracket,Special);const ContStr=group("([uU])?'([^\n'\\\\]*(?:\\\\.[^\n'\\\\]*)*)'",'([uU])?"([^\n"\\\\]*(?:\\\\.[^\n"\\\\]*)*)"');const PseudoToken=Whitespace+group(Number,Funny,ContStr,Name);const NumberPattern=new RegExp("^"+Number+"$");const StringPattern=new RegExp("^"+ContStr+"$");const NamePattern=new RegExp("^"+Name+"$");const strip=new RegExp("^"+Whitespace);__exports.tokenize=tokenize;function tokenize(str){const tokens=[];let max=str.length;let start=0;let end=0;const pseudoprog=new RegExp(PseudoToken,"g");while(pseudoprog.lastIndex> at index "+ (end||0)+"; parsed so far: "+ tokens);} if(pseudomatch.index>end){if(str.slice(end,pseudomatch.index).trim()){throw new TokenizerError("Invalid expression");}} start=pseudomatch.index;end=pseudoprog.lastIndex;let token=str.slice(start,end).replace(strip,"");if(NumberPattern.test(token)){tokens.push({type:0,value:parseFloat(token),});}else if(StringPattern.test(token)){var m=StringPattern.exec(token);tokens.push({type:1,value:decodeStringLiteral(m[3]!==undefined?m[3]:m[5],!!(m[2]||m[4])),});}else if(symbols.has(token)){if(token==="in"&&tokens.length>0&&tokens[tokens.length-1].value==="not"){token="not in";tokens.pop();}else if(token==="not"&&tokens.length>0&&tokens[tokens.length-1].value==="is"){token="is not";tokens.pop();} tokens.push({type:2,value:token,});}else if(constants.has(token)){tokens.push({type:4,value:token,});}else if(NamePattern.test(token)){tokens.push({type:3,value:token,});}else{throw new TokenizerError("Invalid expression");}} return tokens;} return __exports;});; /* /web/static/src/core/py_js/py_utils.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/py_js/py_utils',async function(require){'use strict';let __exports={};const{bp}=require("@web/core/py_js/py_parser");__exports.parseArgs=parseArgs;function parseArgs(args,spec){const last=args[args.length-1];const unnamedArgs=typeof last==="object"?args.slice(0,-1):args;const kwargs=typeof last==="object"?last:{};for(let[index,val]of unnamedArgs.entries()){kwargs[spec[index]]=val;} return kwargs;} __exports.toPyValue=toPyValue;function toPyValue(value){switch(typeof value){case"string":return{type:1,value};case"number":return{type:0,value};case"boolean":return{type:2,value};case"object":if(Array.isArray(value)){return{type:4,value:value.map(toPyValue)};}else if(value===null){return{type:3};}else{const content={};for(let key in value){content[key]=toPyValue(value[key]);} return{type:11,value:content};} default:throw new Error("Invalid type");}} __exports.formatAST=formatAST;function formatAST(ast,lbp=0){switch(ast.type){case 3:return"None";case 1:return JSON.stringify(ast.value);case 0:return String(ast.value);case 2:return ast.value?"True":"False";case 4:return`[${ast.value.map(formatAST).join(", ")}]`;case 6:if(ast.op==="not"){return`not `+formatAST(ast.right,50);} return ast.op+formatAST(ast.right,130);case 7:{const abp=bp(ast.op);const str=`${formatAST(ast.left, abp)} ${ast.op} ${formatAST(ast.right, abp)}`;return abp{this.elements=null;this.entries=null;});} add(key,value,{force,sequence}={}){if(!force&&key in this.content){throw new DuplicatedKeyError(`Cannot add '${key}' in this registry: it already exists`);} let previousSequence;if(force){const elem=this.content[key];previousSequence=elem&&elem[0];} sequence=sequence===undefined?previousSequence||50:sequence;this.content[key]=[sequence,value];const payload={operation:"add",key,value};this.trigger("UPDATE",payload);return this;} get(key,defaultValue){if(arguments.length<2&&!(key in this.content)){throw new KeyNotFoundError(`Cannot find ${key} in this registry!`);} const info=this.content[key];return info?info[1]:defaultValue;} contains(key){return key in this.content;} getAll(){if(!this.elements){const content=Object.values(this.content).sort((el1,el2)=>el1[0]-el2[0]);this.elements=content.map((elem)=>elem[1]);} return this.elements;} getEntries(){if(!this.entries){const entries=Object.entries(this.content).sort((el1,el2)=>el1[1][0]-el2[1][0]);this.entries=entries.map(([str,elem])=>[str,elem[1]]);} return this.entries;} remove(key){const value=this.content[key];delete this.content[key];const payload={operation:"delete",key,value};this.trigger("UPDATE",payload);} category(subcategory){if(!(subcategory in this.subRegistries)){this.subRegistries[subcategory]=new Registry();} return this.subRegistries[subcategory];}} const registry=__exports.registry=new Registry();return __exports;});; /* /web/static/src/core/scroller_service.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/scroller_service',async function(require){'use strict';let __exports={};const{browser}=require("@web/core/browser/browser");const{registry}=require("@web/core/registry");const{scrollTo}=require("@web/core/utils/scrolling");const scrollerService=__exports.scrollerService={start(env){browser.addEventListener("click",(ev)=>{const link=ev.target.closest("a");if(!link){return;} const disableAnchor=link.attributes.getNamedItem("disable_anchor");if(disableAnchor&&disableAnchor.value==="true"){return;} const href=link.attributes.getNamedItem("href");if(href){if(href.value[0]==="#"){if(href.value.length===1){ev.preventDefault();return;} let matchingEl=null;try{matchingEl=document.querySelector(`.o_content #${href.value.substr(1)}`);}catch(e){} const triggerEv=new CustomEvent("anchor-link-clicked",{detail:{element:matchingEl,id:href.value,originalEv:ev,},});env.bus.trigger("SCROLLER:ANCHOR_LINK_CLICKED",triggerEv);if(matchingEl&&!triggerEv.defaultPrevented){ev.preventDefault();scrollTo(matchingEl,{isAnchor:true});}}}});},};registry.category("services").add("scroller",scrollerService);return __exports;});; /* /web/static/src/core/tooltip/tooltip.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/tooltip/tooltip',async function(require){'use strict';let __exports={};const{Component}=owl;const Tooltip=__exports.Tooltip=class Tooltip extends Component{} Tooltip.template="web.Tooltip";Tooltip.props={tooltip:{type:String,optional:true},template:{type:String,optional:true},info:{optional:true},};return __exports;});; /* /web/static/src/core/tooltip/tooltip_hook.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/tooltip/tooltip_hook',async function(require){'use strict';let __exports={};const{browser}=require("@web/core/browser/browser");const{useEffect,useListener}=require("@web/core/utils/hooks");const{usePopover}=require("@web/core/popover/popover_hook");const{Tooltip}=require("@web/core/tooltip/tooltip");const OPEN_DELAY=400;const CLOSE_DELAY=200;__exports.useTooltip=useTooltip;function useTooltip(){const popover=usePopover();let openTooltipTimeout;let closeTooltip;let target=null;function cleanup(){browser.clearTimeout(openTooltipTimeout);if(closeTooltip){closeTooltip();}} function onMouseEnter(ev){const dataset=ev.target.dataset;const tooltip=dataset.tooltip;let template,info;if("tooltipTemplate"in dataset){template=dataset.tooltipTemplate;info=dataset.tooltipInfo?JSON.parse(dataset.tooltipInfo):null;} if(tooltip||template){cleanup();target=ev.target;openTooltipTimeout=browser.setTimeout(()=>{const position=dataset.tooltipPosition;closeTooltip=popover.add(target,Tooltip,{tooltip,template,info},{position});},OPEN_DELAY);}} let positionX;let positionY;useListener("mousemove",(ev)=>{positionX=ev.x;positionY=ev.y;});useEffect(()=>{const interval=browser.setInterval(()=>{if(!target){return;} if(!document.body.contains(target)){return cleanup();} const targetRect=target.getBoundingClientRect();if(positionXtargetRect.right||positionYtargetRect.bottom){return cleanup();}},CLOSE_DELAY);return()=>browser.clearInterval(interval);},()=>[]);const selector="[data-tooltip], [data-tooltip-template]";useListener("mouseenter",selector,onMouseEnter,{capture:true});} return __exports;});; /* /web/static/src/core/ui/block_ui.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/ui/block_ui',async function(require){'use strict';let __exports={};const{browser}=require("@web/core/browser/browser");const{Component,tags,useState}=owl;const BlockUI=__exports.BlockUI=class BlockUI extends Component{setup(){this.messagesByDuration=[{time:20,l1:this.env._t("Loading...")},{time:40,l1:this.env._t("Still loading...")},{time:60,l1:this.env._t("Still loading..."),l2:this.env._t("Please be patient."),},{time:180,l1:this.env._t("Don't leave yet,"),l2:this.env._t("it's still loading..."),},{time:120,l1:this.env._t("You may not believe it,"),l2:this.env._t("but the application is actually loading..."),},{time:3180,l1:this.env._t("Take a minute to get a coffee,"),l2:this.env._t("because it's loading..."),},{time:null,l1:this.env._t("Maybe you should consider reloading the application by pressing F5..."),},];this.state=useState({blockUI:false,line1:"",line2:"",});this.props.bus.on("BLOCK",this,this.block);this.props.bus.on("UNBLOCK",this,this.unblock);} replaceMessage(index){const message=this.messagesByDuration[index];this.state.line1=message.l1;this.state.line2=message.l2||"";if(message.time!==null){this.msgTimer=browser.setTimeout(()=>{this.replaceMessage(index+1);},message.time*1000);}} block(){this.state.blockUI=true;this.replaceMessage(0);} unblock(){this.state.blockUI=false;clearTimeout(this.msgTimer);this.state.line1="";this.state.line2="";}} BlockUI.template=tags.xml`
Loading...

`;return __exports;});; /* /web/static/src/core/ui/ui_service.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/ui/ui_service',async function(require){'use strict';let __exports={};const{useEffect,useService}=require("@web/core/utils/hooks");const{registry}=require("@web/core/registry");const{debounce}=require("@web/core/utils/timing");const{BlockUI}=require("@web/core/ui/block_ui");const{browser}=require("@web/core/browser/browser");const{Component,core,hooks}=owl;const{EventBus}=core;const{useRef}=hooks;const SIZES=__exports.SIZES={XS:0,VSM:1,SM:2,MD:3,LG:4,XL:5,XXL:6};__exports.useActiveElement=useActiveElement;function useActiveElement(refName=null){const uiService=useService("ui");const owner=refName?useRef(refName):Component.current;useEffect(()=>{uiService.activateElement(owner.el);return()=>uiService.deactivateElement(owner.el);},()=>[]);} const uiService=__exports.uiService={start(env){let ui={};const bus=new EventBus();registry.category("main_components").add("BlockUI",{Component:BlockUI,props:{bus}});let blockCount=0;function block(){blockCount++;if(blockCount===1){bus.trigger("BLOCK");}} function unblock(){blockCount--;if(blockCount<0){console.warn("Unblock ui was called more times than block, you should only unblock the UI if you have previously blocked it.");blockCount=0;} if(blockCount===0){bus.trigger("UNBLOCK");}} Object.assign(ui,{bus,block,unblock,});Object.defineProperty(ui,"isBlocked",{get(){return blockCount>0;},});let activeElems=[document];function activateElement(el){activeElems.push(el);bus.trigger("active-element-changed",el);} function deactivateElement(el){activeElems=activeElems.filter((x)=>x!==el);bus.trigger("active-element-changed",ui.activeElement);} function getActiveElementOf(el){for(const activeElement of[...activeElems].reverse()){if(activeElement.contains(el)){return activeElement;}}} Object.assign(ui,{activateElement,deactivateElement,getActiveElementOf,});Object.defineProperty(ui,"activeElement",{get(){return activeElems[activeElems.length-1];},});const MEDIAS=[window.matchMedia("(max-width: 474px)"),window.matchMedia("(min-width: 475px) and (max-width: 575px)"),window.matchMedia("(min-width: 576px) and (max-width: 767px)"),window.matchMedia("(min-width: 768px) and (max-width: 991px)"),window.matchMedia("(min-width: 992px) and (max-width: 1199px)"),window.matchMedia("(min-width: 1200px) and (max-width: 1533px)"),window.matchMedia("(min-width: 1534px)"),];function getSize(){return MEDIAS.findIndex((media)=>media.matches);} function updateSize(){ui.size=getSize();} browser.addEventListener("resize",debounce(updateSize,100));Object.assign(ui,{size:getSize(),});Object.defineProperty(ui,"isSmall",{get(){return ui.size<=SIZES.SM;},});Object.defineProperty(env,"isSmall",{get(){return ui.size<=SIZES.SM;},});return ui;},};registry.category("services").add("ui",uiService);return __exports;});; /* /web/static/src/core/user_service.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/user_service',async function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{session}=require("@web/session");const userService=__exports.userService={dependencies:["rpc"],async:["hasGroup"],start(env,{rpc}){const groupProms={};const context={...session.user_context,uid:session.uid,};return{get context(){return Object.assign({},context);},removeFromContext(key){delete context[key];},updateContext(update){Object.assign(context,update);},hasGroup(group){if(!context.uid){return Promise.resolve(false);} if(!groupProms[group]){groupProms[group]=rpc("/web/dataset/call_kw/res.users/has_group",{model:"res.users",method:"has_group",args:[group],kwargs:{context},});} return groupProms[group];},name:session.name,userName:session.username,isAdmin:session.is_admin,isSystem:session.is_system,partnerId:session.partner_id,home_action_id:session.home_action_id,showEffect:session.show_effect,get userId(){return context.uid;},get lang(){return context.lang;},get tz(){return context.tz;},get db(){const res={name:session.db,};if("dbuuid"in session){res.uuid=session.dbuuid;} return res;},};},};registry.category("services").add("user",userService);return __exports;});; /* /web/static/src/core/utils/arrays.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/utils/arrays',async function(require){'use strict';let __exports={};function _cartesian(){const args=Array.prototype.slice.call(arguments);if(args.length===0){return[undefined];} const firstArray=args[0].map(function(elem){return[elem];});if(args.length===1){return firstArray;} const productOfOtherArrays=_cartesian.apply(null,args.slice(1));return firstArray.reduce(function(acc,elem){return acc.concat(productOfOtherArrays.map(function(tuple){return elem.concat(tuple);}));},[]);} function _getExtractorFrom(criterion){if(criterion){switch(typeof criterion){case"string":return(element)=>element[criterion];case"function":return criterion;default:throw new Error(`Expected criterion of type 'string' or 'function' and got '${typeof criterion}'`);}}else{return(element)=>element;}} __exports.groupBy=groupBy;function groupBy(array,criterion){const extract=_getExtractorFrom(criterion);const groups={};for(const element of array){const group=String(extract(element));if(!(group in groups)){groups[group]=[];} groups[group].push(element);} return groups;} __exports.sortBy=sortBy;function sortBy(array,criterion,order="asc"){const extract=_getExtractorFrom(criterion);return array.slice().sort((elA,elB)=>{const a=extract(elA);const b=extract(elB);let result;if(isNaN(a)&&isNaN(b)){result=a>b?1:a!arrayB.includes(id)).concat(arrayB.filter((id)=>!arrayA.includes(id)));} __exports.cartesian=cartesian;function cartesian(){const args=Array.prototype.slice.call(arguments);if(args.length===0){return[undefined];}else if(args.length===1){return args[0];}else{return _cartesian.apply(null,args);}} __exports.sections=sections;function sections(array){const sections=[];for(let i=0;i`;const ErrorHandler=__exports.ErrorHandler=class ErrorHandler extends Component{catchError(error){if(this.props.onError){this.props.onError(error);}}} ErrorHandler.template=tags.xml``;return __exports;});; /* /web/static/src/core/utils/concurrency.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/utils/concurrency',async function(require){'use strict';let __exports={};const KeepLast=__exports.KeepLast=class KeepLast{constructor(){this._id=0;} add(promise){this._id++;const currentId=this._id;return new Promise((resolve,reject)=>{promise.then((value)=>{if(this._id===currentId){resolve(value);}}).catch((reason)=>{if(this._id===currentId){reject(reason);}});});}} const Mutex=__exports.Mutex=class Mutex{constructor(){this._lock=Promise.resolve();this._queueSize=0;this._unlockedProm=undefined;this._unlock=undefined;} async exec(action){const currentLock=this._lock;let result;this._queueSize++;this._unlockedProm=this._unlockedProm||new Promise((resolve)=>{this._unlock=resolve;});this._lock=new Promise((unlockCurrent)=>{currentLock.then(()=>{result=action();const always=(returnedResult)=>{unlockCurrent();this._queueSize--;if(this._queueSize===0){this._unlockedProm=undefined;this._unlock();} return returnedResult;};Promise.resolve(result).then(always).guardedCatch(always);});});await this._lock;return result;} getUnlockedDef(){return this._unlockedProm||Promise.resolve();}} const Race=__exports.Race=class Race{constructor(){this.currentProm=null;this.currentPromResolver=null;} add(promise){if(!this.currentProm){this.currentProm=new Promise((resolve)=>{this.currentPromResolver=(value)=>{this.currentProm=null;this.currentPromResolver=null;resolve(value);};});} promise.then(this.currentPromResolver);return this.currentProm;} getCurrentProm(){return this.currentProm;}} return __exports;});; /* /web/static/src/core/utils/functions.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/utils/functions',async function(require){'use strict';let __exports={};__exports.memoize=memoize;function memoize(func){const cache=new Map();const funcName=func.name?func.name+" (memoized)":"memoized";return{[funcName](...args){if(!cache.has(args[0])){cache.set(args[0],func(...args));} return cache.get(...args);},}[funcName];} return __exports;});; /* /web/static/src/core/utils/hooks.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/utils/hooks',async function(require){'use strict';let __exports={};const{SERVICES_METADATA}=require("@web/env");const{onMounted,onWillPatch,onPatched,onWillUnmount,useComponent}=owl.hooks;__exports.useAutofocus=useAutofocus;function useAutofocus(params={}){const comp=useComponent();if(comp.env.isSmall){return()=>{};} const selector=params.selector||"[autofocus]";let forceFocusCount=0;useEffect(function autofocus(){const target=comp.el.querySelector(selector);if(target){target.focus();if(["INPUT","TEXTAREA"].includes(target.tagName)){const inputEl=target;inputEl.selectionStart=inputEl.selectionEnd=inputEl.value.length;}}},()=>[forceFocusCount]);return function focusOnUpdate(){forceFocusCount++;};} __exports.useBus=useBus;function useBus(bus,eventName,callback){const component=useComponent();useEffect(()=>{bus.on(eventName,component,callback);return()=>bus.off(eventName,component);},()=>[]);} const NO_OP=()=>{};__exports.useEffect=useEffect;function useEffect(effect,computeDependencies=()=>[NaN]){let cleanup,dependencies;onMounted(()=>{dependencies=computeDependencies();cleanup=effect(...dependencies)||NO_OP;});let shouldReapplyOnPatch=false;onWillPatch(()=>{const newDeps=computeDependencies();shouldReapplyOnPatch=newDeps.some((val,i)=>val!==dependencies[i]);if(shouldReapplyOnPatch){cleanup();dependencies=newDeps;}});onPatched(()=>{if(shouldReapplyOnPatch){cleanup=effect(...dependencies)||NO_OP;}});onWillUnmount(()=>cleanup());} __exports.useListener=useListener;function useListener(eventName,querySelector,handler,options={}){if(typeof arguments[1]!=="string"){querySelector=null;handler=arguments[1];options=arguments[2]||{};} if(typeof handler!=="function"){throw new Error("The handler must be a function");} const comp=useComponent();let boundHandler;if(querySelector){boundHandler=function(ev){let el=ev.target;let target;while(el&&!target){if(el.matches(querySelector)){target=el;}else if(el===comp.el){el=null;}else{el=el.parentElement;}} if(el){handler.call(comp,ev);}};}else{boundHandler=handler.bind(comp);} useEffect(()=>{comp.el.addEventListener(eventName,boundHandler,options);return()=>{comp.el.removeEventListener(eventName,boundHandler,options);};},()=>[]);} function _protectMethod(component,caller,fn){return async(...args)=>{if(component.__owl__.status===5){throw new Error("Component is destroyed");} const result=await fn.call(caller,...args);return component.__owl__.status===5?new Promise(()=>{}):result;};} __exports.useService=useService;function useService(serviceName){const component=useComponent();const{services}=component.env;if(!(serviceName in services)){throw new Error(`Service ${serviceName} is not available`);} const service=services[serviceName];if(serviceName in SERVICES_METADATA){if(service instanceof Function){return _protectMethod(component,null,service);}else{const methods=SERVICES_METADATA[serviceName];const result=Object.create(service);for(let method of methods){result[method]=_protectMethod(component,service,service[method]);} return result;}} return service;} __exports.onDestroyed=onDestroyed;function onDestroyed(callback){const component=useComponent();const _destroy=component.__destroy;component.__destroy=(...args)=>{_destroy.call(component,...args);callback();};} return __exports;});; /* /web/static/src/core/utils/numbers.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/utils/numbers',async function(require){'use strict';let __exports={};__exports.computeVariation=computeVariation;function computeVariation(value,comparisonValue){if(isNaN(value)||isNaN(comparisonValue)){return NaN;} if(comparisonValue===0){if(value===0){return 0;}else if(value>0){return 1;}else{return-1;}} return(value-comparisonValue)/Math.abs(comparisonValue);} return __exports;});; /* /web/static/src/core/utils/objects.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/utils/objects',async function(require){'use strict';let __exports={};__exports.shallowEqual=shallowEqual;function shallowEqual(obj1,obj2){const obj1Keys=Object.keys(obj1);return(obj1Keys.length===Object.keys(obj2).length&&obj1Keys.every((key)=>obj1[key]===obj2[key]));} __exports.deepCopy=deepCopy;function deepCopy(obj){return JSON.parse(JSON.stringify(obj));} return __exports;});; /* /web/static/src/core/utils/patch.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/utils/patch',async function(require){'use strict';let __exports={};const patchMap=new WeakMap();__exports.patch=patch;function patch(obj,patchName,patchValue,options={}){const pure=Boolean(options.pure);if(!patchMap.has(obj)){patchMap.set(obj,{original:{},patches:[],});} const objDesc=patchMap.get(obj);if(objDesc.patches.some((p)=>p.name===patchName)){throw new Error(`Class ${obj.name} already has a patch ${patchName}`);} objDesc.patches.push({name:patchName,patch:patchValue,pure,});for(const k in patchValue){let prevDesc=null;let proto=obj;do{prevDesc=Object.getOwnPropertyDescriptor(proto,k);proto=Object.getPrototypeOf(proto);}while(!prevDesc&&proto);const newDesc=Object.getOwnPropertyDescriptor(patchValue,k);if(!objDesc.original.hasOwnProperty(k)){objDesc.original[k]=Object.getOwnPropertyDescriptor(obj,k);} if(prevDesc){const patchedFnName=`${k} (patch ${patchName})`;if(prevDesc.value&&typeof newDesc.value==="function"){makeIntermediateFunction("value",prevDesc,newDesc,patchedFnName);} if((newDesc.get||newDesc.set)&&(prevDesc.get||prevDesc.set)){newDesc.get=newDesc.get||prevDesc.get;newDesc.set=newDesc.set||prevDesc.set;if(prevDesc.get&&typeof newDesc.get==="function"){makeIntermediateFunction("get",prevDesc,newDesc,patchedFnName);} if(prevDesc.set&&typeof newDesc.set==="function"){makeIntermediateFunction("set",prevDesc,newDesc,patchedFnName);}}} Object.defineProperty(obj,k,newDesc);} function makeIntermediateFunction(key,prevDesc,newDesc,patchedFnName){const _superFn=prevDesc[key];const patchFn=newDesc[key];if(pure){newDesc[key]=patchFn;}else{newDesc[key]={[patchedFnName](...args){let prevSuper;if(this){prevSuper=this._super;Object.defineProperty(this,"_super",{value:_superFn.bind(this),configurable:true,writable:true,});} const result=patchFn.call(this,...args);if(this){Object.defineProperty(this,"_super",{value:prevSuper,configurable:true,writable:true,});} return result;},}[patchedFnName];}}} __exports.unpatch=unpatch;function unpatch(obj,patchName){const objDesc=patchMap.get(obj);if(!objDesc.patches.some((p)=>p.name===patchName)){throw new Error(`Class ${obj.name} does not have any patch ${patchName}`);} patchMap.delete(obj);for(const k in objDesc.original){if(objDesc.original[k]===undefined){delete obj[k];}else{Object.defineProperty(obj,k,objDesc.original[k]);}} for(const patchDesc of objDesc.patches){if(patchDesc.name!==patchName){patch(obj,patchDesc.name,patchDesc.patch,{pure:patchDesc.pure});}}} return __exports;});; /* /web/static/src/core/utils/scrolling.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/utils/scrolling',async function(require){'use strict';let __exports={};__exports.scrollTo=scrollTo;function scrollTo(element,options={scrollable:null,isAnchor:false}){function _getScrollParent(node){if(node==null){return null;} if(node.scrollHeight>node.clientHeight&&node.clientHeight>0){return node;}else{return _getScrollParent(node.parentNode);}} const scrollable=options.scrollable?options.scrollable:_getScrollParent(element.parentNode);if(scrollable){const scrollBottom=scrollable.getBoundingClientRect().bottom;const scrollTop=scrollable.getBoundingClientRect().top;const elementBottom=element.getBoundingClientRect().bottom;const elementTop=element.getBoundingClientRect().top;if(elementBottom>scrollBottom&&!options.isAnchor){scrollable.scrollTop+=elementTop-scrollBottom+Math.ceil(element.getBoundingClientRect().height);}else if(elementTop{const score=match(pattern,fn(data));if(score>0){results.push({score,elem:data});}});results.sort((a,b)=>b.score-a.score);return results.map((r)=>r.elem);} __exports.fuzzyTest=fuzzyTest;function fuzzyTest(pattern,string){return match(pattern,string)!==0;} return __exports;});; /* /web/static/src/core/utils/strings.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/utils/strings',async function(require){'use strict';let __exports={};__exports.escapeRegExp=escapeRegExp;function escapeRegExp(str){return str.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");} __exports.intersperse=intersperse;function intersperse(str,indices,separator=""){separator=separator||"";const result=[];let last=str.length;for(let i=0;ivaluesDict[value]);}else if(values.length>0){s=s.replace(/\%s/g,()=>values.shift());} return s;} __exports.capitalize=capitalize;function capitalize(s){return s?s[0].toUpperCase()+s.slice(1):"";} const diacriticsMap={'\u0041':'A','\u24B6':'A','\uFF21':'A','\u00C0':'A','\u00C1':'A','\u00C2':'A','\u1EA6':'A','\u1EA4':'A','\u1EAA':'A','\u1EA8':'A','\u00C3':'A','\u0100':'A','\u0102':'A','\u1EB0':'A','\u1EAE':'A','\u1EB4':'A','\u1EB2':'A','\u0226':'A','\u01E0':'A','\u00C4':'A','\u01DE':'A','\u1EA2':'A','\u00C5':'A','\u01FA':'A','\u01CD':'A','\u0200':'A','\u0202':'A','\u1EA0':'A','\u1EAC':'A','\u1EB6':'A','\u1E00':'A','\u0104':'A','\u023A':'A','\u2C6F':'A','\uA732':'AA','\u00C6':'AE','\u01FC':'AE','\u01E2':'AE','\uA734':'AO','\uA736':'AU','\uA738':'AV','\uA73A':'AV','\uA73C':'AY','\u0042':'B','\u24B7':'B','\uFF22':'B','\u1E02':'B','\u1E04':'B','\u1E06':'B','\u0243':'B','\u0182':'B','\u0181':'B','\u0043':'C','\u24B8':'C','\uFF23':'C','\u0106':'C','\u0108':'C','\u010A':'C','\u010C':'C','\u00C7':'C','\u1E08':'C','\u0187':'C','\u023B':'C','\uA73E':'C','\u0044':'D','\u24B9':'D','\uFF24':'D','\u1E0A':'D','\u010E':'D','\u1E0C':'D','\u1E10':'D','\u1E12':'D','\u1E0E':'D','\u0110':'D','\u018B':'D','\u018A':'D','\u0189':'D','\uA779':'D','\u01F1':'DZ','\u01C4':'DZ','\u01F2':'Dz','\u01C5':'Dz','\u0045':'E','\u24BA':'E','\uFF25':'E','\u00C8':'E','\u00C9':'E','\u00CA':'E','\u1EC0':'E','\u1EBE':'E','\u1EC4':'E','\u1EC2':'E','\u1EBC':'E','\u0112':'E','\u1E14':'E','\u1E16':'E','\u0114':'E','\u0116':'E','\u00CB':'E','\u1EBA':'E','\u011A':'E','\u0204':'E','\u0206':'E','\u1EB8':'E','\u1EC6':'E','\u0228':'E','\u1E1C':'E','\u0118':'E','\u1E18':'E','\u1E1A':'E','\u0190':'E','\u018E':'E','\u0046':'F','\u24BB':'F','\uFF26':'F','\u1E1E':'F','\u0191':'F','\uA77B':'F','\u0047':'G','\u24BC':'G','\uFF27':'G','\u01F4':'G','\u011C':'G','\u1E20':'G','\u011E':'G','\u0120':'G','\u01E6':'G','\u0122':'G','\u01E4':'G','\u0193':'G','\uA7A0':'G','\uA77D':'G','\uA77E':'G','\u0048':'H','\u24BD':'H','\uFF28':'H','\u0124':'H','\u1E22':'H','\u1E26':'H','\u021E':'H','\u1E24':'H','\u1E28':'H','\u1E2A':'H','\u0126':'H','\u2C67':'H','\u2C75':'H','\uA78D':'H','\u0049':'I','\u24BE':'I','\uFF29':'I','\u00CC':'I','\u00CD':'I','\u00CE':'I','\u0128':'I','\u012A':'I','\u012C':'I','\u0130':'I','\u00CF':'I','\u1E2E':'I','\u1EC8':'I','\u01CF':'I','\u0208':'I','\u020A':'I','\u1ECA':'I','\u012E':'I','\u1E2C':'I','\u0197':'I','\u004A':'J','\u24BF':'J','\uFF2A':'J','\u0134':'J','\u0248':'J','\u004B':'K','\u24C0':'K','\uFF2B':'K','\u1E30':'K','\u01E8':'K','\u1E32':'K','\u0136':'K','\u1E34':'K','\u0198':'K','\u2C69':'K','\uA740':'K','\uA742':'K','\uA744':'K','\uA7A2':'K','\u004C':'L','\u24C1':'L','\uFF2C':'L','\u013F':'L','\u0139':'L','\u013D':'L','\u1E36':'L','\u1E38':'L','\u013B':'L','\u1E3C':'L','\u1E3A':'L','\u0141':'L','\u023D':'L','\u2C62':'L','\u2C60':'L','\uA748':'L','\uA746':'L','\uA780':'L','\u01C7':'LJ','\u01C8':'Lj','\u004D':'M','\u24C2':'M','\uFF2D':'M','\u1E3E':'M','\u1E40':'M','\u1E42':'M','\u2C6E':'M','\u019C':'M','\u004E':'N','\u24C3':'N','\uFF2E':'N','\u01F8':'N','\u0143':'N','\u00D1':'N','\u1E44':'N','\u0147':'N','\u1E46':'N','\u0145':'N','\u1E4A':'N','\u1E48':'N','\u0220':'N','\u019D':'N','\uA790':'N','\uA7A4':'N','\u01CA':'NJ','\u01CB':'Nj','\u004F':'O','\u24C4':'O','\uFF2F':'O','\u00D2':'O','\u00D3':'O','\u00D4':'O','\u1ED2':'O','\u1ED0':'O','\u1ED6':'O','\u1ED4':'O','\u00D5':'O','\u1E4C':'O','\u022C':'O','\u1E4E':'O','\u014C':'O','\u1E50':'O','\u1E52':'O','\u014E':'O','\u022E':'O','\u0230':'O','\u00D6':'O','\u022A':'O','\u1ECE':'O','\u0150':'O','\u01D1':'O','\u020C':'O','\u020E':'O','\u01A0':'O','\u1EDC':'O','\u1EDA':'O','\u1EE0':'O','\u1EDE':'O','\u1EE2':'O','\u1ECC':'O','\u1ED8':'O','\u01EA':'O','\u01EC':'O','\u00D8':'O','\u01FE':'O','\u0186':'O','\u019F':'O','\uA74A':'O','\uA74C':'O','\u01A2':'OI','\uA74E':'OO','\u0222':'OU','\u0050':'P','\u24C5':'P','\uFF30':'P','\u1E54':'P','\u1E56':'P','\u01A4':'P','\u2C63':'P','\uA750':'P','\uA752':'P','\uA754':'P','\u0051':'Q','\u24C6':'Q','\uFF31':'Q','\uA756':'Q','\uA758':'Q','\u024A':'Q','\u0052':'R','\u24C7':'R','\uFF32':'R','\u0154':'R','\u1E58':'R','\u0158':'R','\u0210':'R','\u0212':'R','\u1E5A':'R','\u1E5C':'R','\u0156':'R','\u1E5E':'R','\u024C':'R','\u2C64':'R','\uA75A':'R','\uA7A6':'R','\uA782':'R','\u0053':'S','\u24C8':'S','\uFF33':'S','\u1E9E':'S','\u015A':'S','\u1E64':'S','\u015C':'S','\u1E60':'S','\u0160':'S','\u1E66':'S','\u1E62':'S','\u1E68':'S','\u0218':'S','\u015E':'S','\u2C7E':'S','\uA7A8':'S','\uA784':'S','\u0054':'T','\u24C9':'T','\uFF34':'T','\u1E6A':'T','\u0164':'T','\u1E6C':'T','\u021A':'T','\u0162':'T','\u1E70':'T','\u1E6E':'T','\u0166':'T','\u01AC':'T','\u01AE':'T','\u023E':'T','\uA786':'T','\uA728':'TZ','\u0055':'U','\u24CA':'U','\uFF35':'U','\u00D9':'U','\u00DA':'U','\u00DB':'U','\u0168':'U','\u1E78':'U','\u016A':'U','\u1E7A':'U','\u016C':'U','\u00DC':'U','\u01DB':'U','\u01D7':'U','\u01D5':'U','\u01D9':'U','\u1EE6':'U','\u016E':'U','\u0170':'U','\u01D3':'U','\u0214':'U','\u0216':'U','\u01AF':'U','\u1EEA':'U','\u1EE8':'U','\u1EEE':'U','\u1EEC':'U','\u1EF0':'U','\u1EE4':'U','\u1E72':'U','\u0172':'U','\u1E76':'U','\u1E74':'U','\u0244':'U','\u0056':'V','\u24CB':'V','\uFF36':'V','\u1E7C':'V','\u1E7E':'V','\u01B2':'V','\uA75E':'V','\u0245':'V','\uA760':'VY','\u0057':'W','\u24CC':'W','\uFF37':'W','\u1E80':'W','\u1E82':'W','\u0174':'W','\u1E86':'W','\u1E84':'W','\u1E88':'W','\u2C72':'W','\u0058':'X','\u24CD':'X','\uFF38':'X','\u1E8A':'X','\u1E8C':'X','\u0059':'Y','\u24CE':'Y','\uFF39':'Y','\u1EF2':'Y','\u00DD':'Y','\u0176':'Y','\u1EF8':'Y','\u0232':'Y','\u1E8E':'Y','\u0178':'Y','\u1EF6':'Y','\u1EF4':'Y','\u01B3':'Y','\u024E':'Y','\u1EFE':'Y','\u005A':'Z','\u24CF':'Z','\uFF3A':'Z','\u0179':'Z','\u1E90':'Z','\u017B':'Z','\u017D':'Z','\u1E92':'Z','\u1E94':'Z','\u01B5':'Z','\u0224':'Z','\u2C7F':'Z','\u2C6B':'Z','\uA762':'Z','\u0061':'a','\u24D0':'a','\uFF41':'a','\u1E9A':'a','\u00E0':'a','\u00E1':'a','\u00E2':'a','\u1EA7':'a','\u1EA5':'a','\u1EAB':'a','\u1EA9':'a','\u00E3':'a','\u0101':'a','\u0103':'a','\u1EB1':'a','\u1EAF':'a','\u1EB5':'a','\u1EB3':'a','\u0227':'a','\u01E1':'a','\u00E4':'a','\u01DF':'a','\u1EA3':'a','\u00E5':'a','\u01FB':'a','\u01CE':'a','\u0201':'a','\u0203':'a','\u1EA1':'a','\u1EAD':'a','\u1EB7':'a','\u1E01':'a','\u0105':'a','\u2C65':'a','\u0250':'a','\uA733':'aa','\u00E6':'ae','\u01FD':'ae','\u01E3':'ae','\uA735':'ao','\uA737':'au','\uA739':'av','\uA73B':'av','\uA73D':'ay','\u0062':'b','\u24D1':'b','\uFF42':'b','\u1E03':'b','\u1E05':'b','\u1E07':'b','\u0180':'b','\u0183':'b','\u0253':'b','\u0063':'c','\u24D2':'c','\uFF43':'c','\u0107':'c','\u0109':'c','\u010B':'c','\u010D':'c','\u00E7':'c','\u1E09':'c','\u0188':'c','\u023C':'c','\uA73F':'c','\u2184':'c','\u0064':'d','\u24D3':'d','\uFF44':'d','\u1E0B':'d','\u010F':'d','\u1E0D':'d','\u1E11':'d','\u1E13':'d','\u1E0F':'d','\u0111':'d','\u018C':'d','\u0256':'d','\u0257':'d','\uA77A':'d','\u01F3':'dz','\u01C6':'dz','\u0065':'e','\u24D4':'e','\uFF45':'e','\u00E8':'e','\u00E9':'e','\u00EA':'e','\u1EC1':'e','\u1EBF':'e','\u1EC5':'e','\u1EC3':'e','\u1EBD':'e','\u0113':'e','\u1E15':'e','\u1E17':'e','\u0115':'e','\u0117':'e','\u00EB':'e','\u1EBB':'e','\u011B':'e','\u0205':'e','\u0207':'e','\u1EB9':'e','\u1EC7':'e','\u0229':'e','\u1E1D':'e','\u0119':'e','\u1E19':'e','\u1E1B':'e','\u0247':'e','\u025B':'e','\u01DD':'e','\u0066':'f','\u24D5':'f','\uFF46':'f','\u1E1F':'f','\u0192':'f','\uA77C':'f','\u0067':'g','\u24D6':'g','\uFF47':'g','\u01F5':'g','\u011D':'g','\u1E21':'g','\u011F':'g','\u0121':'g','\u01E7':'g','\u0123':'g','\u01E5':'g','\u0260':'g','\uA7A1':'g','\u1D79':'g','\uA77F':'g','\u0068':'h','\u24D7':'h','\uFF48':'h','\u0125':'h','\u1E23':'h','\u1E27':'h','\u021F':'h','\u1E25':'h','\u1E29':'h','\u1E2B':'h','\u1E96':'h','\u0127':'h','\u2C68':'h','\u2C76':'h','\u0265':'h','\u0195':'hv','\u0069':'i','\u24D8':'i','\uFF49':'i','\u00EC':'i','\u00ED':'i','\u00EE':'i','\u0129':'i','\u012B':'i','\u012D':'i','\u00EF':'i','\u1E2F':'i','\u1EC9':'i','\u01D0':'i','\u0209':'i','\u020B':'i','\u1ECB':'i','\u012F':'i','\u1E2D':'i','\u0268':'i','\u0131':'i','\u006A':'j','\u24D9':'j','\uFF4A':'j','\u0135':'j','\u01F0':'j','\u0249':'j','\u006B':'k','\u24DA':'k','\uFF4B':'k','\u1E31':'k','\u01E9':'k','\u1E33':'k','\u0137':'k','\u1E35':'k','\u0199':'k','\u2C6A':'k','\uA741':'k','\uA743':'k','\uA745':'k','\uA7A3':'k','\u006C':'l','\u24DB':'l','\uFF4C':'l','\u0140':'l','\u013A':'l','\u013E':'l','\u1E37':'l','\u1E39':'l','\u013C':'l','\u1E3D':'l','\u1E3B':'l','\u017F':'l','\u0142':'l','\u019A':'l','\u026B':'l','\u2C61':'l','\uA749':'l','\uA781':'l','\uA747':'l','\u01C9':'lj','\u006D':'m','\u24DC':'m','\uFF4D':'m','\u1E3F':'m','\u1E41':'m','\u1E43':'m','\u0271':'m','\u026F':'m','\u006E':'n','\u24DD':'n','\uFF4E':'n','\u01F9':'n','\u0144':'n','\u00F1':'n','\u1E45':'n','\u0148':'n','\u1E47':'n','\u0146':'n','\u1E4B':'n','\u1E49':'n','\u019E':'n','\u0272':'n','\u0149':'n','\uA791':'n','\uA7A5':'n','\u01CC':'nj','\u006F':'o','\u24DE':'o','\uFF4F':'o','\u00F2':'o','\u00F3':'o','\u00F4':'o','\u1ED3':'o','\u1ED1':'o','\u1ED7':'o','\u1ED5':'o','\u00F5':'o','\u1E4D':'o','\u022D':'o','\u1E4F':'o','\u014D':'o','\u1E51':'o','\u1E53':'o','\u014F':'o','\u022F':'o','\u0231':'o','\u00F6':'o','\u022B':'o','\u1ECF':'o','\u0151':'o','\u01D2':'o','\u020D':'o','\u020F':'o','\u01A1':'o','\u1EDD':'o','\u1EDB':'o','\u1EE1':'o','\u1EDF':'o','\u1EE3':'o','\u1ECD':'o','\u1ED9':'o','\u01EB':'o','\u01ED':'o','\u00F8':'o','\u01FF':'o','\u0254':'o','\uA74B':'o','\uA74D':'o','\u0275':'o','\u01A3':'oi','\u0223':'ou','\uA74F':'oo','\u0070':'p','\u24DF':'p','\uFF50':'p','\u1E55':'p','\u1E57':'p','\u01A5':'p','\u1D7D':'p','\uA751':'p','\uA753':'p','\uA755':'p','\u0071':'q','\u24E0':'q','\uFF51':'q','\u024B':'q','\uA757':'q','\uA759':'q','\u0072':'r','\u24E1':'r','\uFF52':'r','\u0155':'r','\u1E59':'r','\u0159':'r','\u0211':'r','\u0213':'r','\u1E5B':'r','\u1E5D':'r','\u0157':'r','\u1E5F':'r','\u024D':'r','\u027D':'r','\uA75B':'r','\uA7A7':'r','\uA783':'r','\u0073':'s','\u24E2':'s','\uFF53':'s','\u00DF':'s','\u015B':'s','\u1E65':'s','\u015D':'s','\u1E61':'s','\u0161':'s','\u1E67':'s','\u1E63':'s','\u1E69':'s','\u0219':'s','\u015F':'s','\u023F':'s','\uA7A9':'s','\uA785':'s','\u1E9B':'s','\u0074':'t','\u24E3':'t','\uFF54':'t','\u1E6B':'t','\u1E97':'t','\u0165':'t','\u1E6D':'t','\u021B':'t','\u0163':'t','\u1E71':'t','\u1E6F':'t','\u0167':'t','\u01AD':'t','\u0288':'t','\u2C66':'t','\uA787':'t','\uA729':'tz','\u0075':'u','\u24E4':'u','\uFF55':'u','\u00F9':'u','\u00FA':'u','\u00FB':'u','\u0169':'u','\u1E79':'u','\u016B':'u','\u1E7B':'u','\u016D':'u','\u00FC':'u','\u01DC':'u','\u01D8':'u','\u01D6':'u','\u01DA':'u','\u1EE7':'u','\u016F':'u','\u0171':'u','\u01D4':'u','\u0215':'u','\u0217':'u','\u01B0':'u','\u1EEB':'u','\u1EE9':'u','\u1EEF':'u','\u1EED':'u','\u1EF1':'u','\u1EE5':'u','\u1E73':'u','\u0173':'u','\u1E77':'u','\u1E75':'u','\u0289':'u','\u0076':'v','\u24E5':'v','\uFF56':'v','\u1E7D':'v','\u1E7F':'v','\u028B':'v','\uA75F':'v','\u028C':'v','\uA761':'vy','\u0077':'w','\u24E6':'w','\uFF57':'w','\u1E81':'w','\u1E83':'w','\u0175':'w','\u1E87':'w','\u1E85':'w','\u1E98':'w','\u1E89':'w','\u2C73':'w','\u0078':'x','\u24E7':'x','\uFF58':'x','\u1E8B':'x','\u1E8D':'x','\u0079':'y','\u24E8':'y','\uFF59':'y','\u1EF3':'y','\u00FD':'y','\u0177':'y','\u1EF9':'y','\u0233':'y','\u1E8F':'y','\u00FF':'y','\u1EF7':'y','\u1E99':'y','\u1EF5':'y','\u01B4':'y','\u024F':'y','\u1EFF':'y','\u007A':'z','\u24E9':'z','\uFF5A':'z','\u017A':'z','\u1E91':'z','\u017C':'z','\u017E':'z','\u1E93':'z','\u1E95':'z','\u01B6':'z','\u0225':'z','\u0240':'z','\u2C6C':'z','\uA763':'z',};__exports.unaccent=unaccent;function unaccent(str,caseSensitive){str=str.replace(/[^\u0000-\u007E]/g,function(accented){return diacriticsMap[accented]||accented;});return caseSensitive?str:str.toLowerCase();} return __exports;});; /* /web/static/src/core/utils/timing.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/utils/timing',async function(require){'use strict';let __exports={};const{browser}=require("@web/core/browser/browser");__exports.throttleForAnimation=throttleForAnimation;function throttleForAnimation(func){let handle=null;const funcName=func.name?`${func.name} (throttleForAnimation)`:"throttleForAnimation";return Object.assign({[funcName](...args){browser.cancelAnimationFrame(handle);handle=browser.requestAnimationFrame(()=>{handle=null;func.call(this,...args);});},}[funcName],{cancel(){browser.cancelAnimationFrame(handle);},});} __exports.debounce=debounce;function debounce(func,wait,immediate=false){let timeout;const funcName=func.name?func.name+" (debounce)":"debounce";return Object.assign({[funcName](...args){return new Promise((resolve)=>{const callNow=immediate&&!timeout;browser.clearTimeout(timeout);timeout=browser.setTimeout(()=>{timeout=null;if(!immediate){Promise.resolve(func.apply(this,args)).then(resolve);}},wait);if(callNow){Promise.resolve(func.apply(this,args)).then(resolve);}});},}[funcName],{cancel(){browser.clearTimeout(timeout);},});} __exports.throttle=throttle;function throttle(func,wait){let waiting=false;const funcName=func.name?func.name+" (throttle)":"throttle";return{[funcName](...args){const context=this;if(!waiting){waiting=true;browser.setTimeout(function(){waiting=false;func.call(context,...args);},wait);}},}[funcName];} return __exports;});; /* /web/static/src/core/utils/ui.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/utils/ui',async function(require){'use strict';let __exports={};__exports.getVisibleElements=getVisibleElements;function getVisibleElements(activeElement,selector){const visibleElements=[];for(const el of activeElement.querySelectorAll(selector)){const isVisible=el.offsetWidth>0&&el.offsetHeight>0;if(isVisible){visibleElements.push(el);}} return visibleElements;} return __exports;});; /* /web/static/src/core/utils/urls.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/utils/urls',async function(require){'use strict';let __exports={};const{browser}=require("@web/core/browser/browser");__exports.objectToUrlEncodedString=objectToUrlEncodedString;function objectToUrlEncodedString(obj){return Object.entries(obj).map(([k,v])=>(v?`${k}=${encodeURIComponent(v)}`:k)).join("&");} __exports.getOrigin=getOrigin;function getOrigin(origin){if(origin){origin=origin.replace(/\/+$/,"");}else{const{host,protocol}=browser.location;origin=`${protocol}//${host}`;} return origin;} __exports.url=url;function url(route,queryParams,options={}){const origin=getOrigin(options.origin);if(!route){return origin;} let queryString=objectToUrlEncodedString(queryParams||{});queryString=queryString.length>0?`?${queryString}`:queryString;let prefix=["http://","https://","//"].some((el)=>route.length>=el.length&&route.slice(0,el.length)===el);prefix=prefix?"":origin;return`${prefix}${route}${queryString}`;} return __exports;});; /* /web/static/src/core/utils/xml.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/core/utils/xml',async function(require){'use strict';let __exports={};function hasParsingError(parsedDocument){return parsedDocument.getElementsByTagName("parsererror").length>0;} const XMLParser=__exports.XMLParser=class XMLParser{parse(){} visitXML(xml,callback){function visit(xml){if(xml){let didVisitChildren=false;const visitChildren=()=>{for(let child of xml.children){visit(child);} didVisitChildren=true;};const shouldVisitChildren=callback(xml,visitChildren);if(shouldVisitChildren!==false&&!didVisitChildren){visitChildren();}}} const xmlDoc=typeof xml==="string"?this.parseXML(xml):xml;visit(xmlDoc);} parseXML(arch){const parser=new DOMParser();const xml=parser.parseFromString(arch,"text/xml");if(hasParsingError(xml)){throw new Error(`An error occured while parsing ${arch}: ${xml.getElementsByTagName("parsererror")}`);} return xml.documentElement;}} return __exports;});; /* /web/static/src/public/error_notifications.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/public/error_notifications',async function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{odooExceptionTitleMap}=require("@web/core/errors/error_dialogs");const{_t}=require("@web/core/l10n/translation");odooExceptionTitleMap.forEach((title,exceptionName)=>{registry.category("error_notifications").add(exceptionName,{title:title,type:"warning",sticky:true});});const sessionExpired={title:_t("Odoo Session Expired"),message:_t("Your Odoo session expired. The current page is about to be refreshed."),buttons:[{text:_t("Ok"),click:()=>window.location.reload(true),close:true}]};registry.category("error_notifications").add("odoo.http.SessionExpiredException",sessionExpired).add("werkzeug.exceptions.Forbidden",sessionExpired).add("504",{title:_t("Request timeout"),message:_t("The operation was interrupted. This usually means that the current operation is taking too much time.")});return __exports;});; /* /web_editor/static/src/js/frontend/loader_loading.js defined in bundle 'web.assets_frontend_lazy' */ (function(){'use strict';document.addEventListener('DOMContentLoaded',()=>{var textareaEls=document.querySelectorAll('textarea.o_wysiwyg_loader');for(var i=0;i{env.bus.trigger("RPC:REQUEST",rpcId);});legacyEnv.bus.on("rpc_response",null,(rpcId)=>{env.bus.trigger("RPC:RESPONSE",rpcId);});legacyEnv.bus.on("rpc_response_failed",null,(rpcId)=>{env.bus.trigger("RPC:RESPONSE",rpcId);});},};} __exports.makeLegacyDialogMappingService=makeLegacyDialogMappingService;function makeLegacyDialogMappingService(legacyEnv){return{dependencies:["ui","hotkey"],start(env){const{ui,hotkey}=env.services;function getModalEl(dialog){return dialog.modalRef?dialog.modalRef.el:dialog.$modal[0];} function getCloseCallback(dialog){return dialog.modalRef?()=>dialog._close():()=>dialog.$modal.modal("hide");} const dialogHotkeyRemoveMap=new Map();function onOpenDialog(dialog){ui.activateElement(getModalEl(dialog));const remove=hotkey.add("escape",getCloseCallback(dialog));dialogHotkeyRemoveMap.set(dialog,remove);} function onCloseDialog(dialog){ui.deactivateElement(getModalEl(dialog));if(dialogHotkeyRemoveMap.has(dialog)){const removeHotkey=dialogHotkeyRemoveMap.get(dialog);removeHotkey();dialogHotkeyRemoveMap.delete(dialog);}} legacyEnv.bus.on("legacy_dialog_opened",null,onOpenDialog);legacyEnv.bus.on("legacy_dialog_destroyed",null,onCloseDialog);legacyEnv.bus.on("owl_dialog_mounted",null,onOpenDialog);legacyEnv.bus.on("owl_dialog_willunmount",null,onCloseDialog);},};} __exports.makeLegacyCommandService=makeLegacyCommandService;function makeLegacyCommandService(legacyEnv){return{dependencies:["command"],start(env){const{command}=env.services;const commandRemoveMap=new Map();function setLegacyCommand(uniqueId,getCommandDefinition){const{name,action,options}=getCommandDefinition(env);removeLegacyCommand(uniqueId);commandRemoveMap.set(uniqueId,command.add(name,action,options));} function removeLegacyCommand(uniqueId){if(commandRemoveMap.has(uniqueId)){const removeCommand=commandRemoveMap.get(uniqueId);removeCommand();commandRemoveMap.delete(uniqueId);}} legacyEnv.bus.on("set_legacy_command",null,setLegacyCommand);legacyEnv.bus.on("remove_legacy_command",null,removeLegacyCommand);},};} __exports.makeLegacyDropdownService=makeLegacyDropdownService;function makeLegacyDropdownService(legacyEnv){return{dependencies:["ui","hotkey"],start(_,{ui,hotkey}){legacyEnv.services.ui=ui;legacyEnv.services.hotkey=hotkey;},};} __exports.makeLegacySessionService=makeLegacySessionService;function makeLegacySessionService(legacyEnv,session){return{dependencies:["user"],start(env){function mapContext(){return Object.assign({},env.services.user.context);} Object.defineProperty(legacyEnv.session,"userContext",{get:()=>mapContext(),});Object.defineProperty(session,"user_context",{get:()=>mapContext(),});},};} __exports.mapLegacyEnvToWowlEnv=mapLegacyEnvToWowlEnv;function mapLegacyEnvToWowlEnv(legacyEnv,wowlEnv){legacyEnv.session.rpc=(...args)=>{let rejection;const prom=new Promise((resolve,reject)=>{const[route,params,settings={}]=args;if(params&¶ms.kwargs){params.kwargs.context=Object.assign(params.kwargs.context||{},legacyEnv.session.user_context);} const jsonrpc=wowlEnv.services.rpc(route,params,{silent:settings.shadow,xhr:settings.xhr,});rejection=()=>{jsonrpc.abort();};jsonrpc.then(resolve).catch((reason)=>{if(reason instanceof RPCError||reason instanceof ConnectionLostError){reject({message:reason,event:$.Event(),legacy:true});}else if(reason instanceof ConnectionAbortedError){reject({message:reason.message,event:$.Event("abort")});}else{reject(reason);}});});prom.abort=rejection;return prom;};function mapStorage(storage){const StorageService=AbstractStorageService.extend({storage});return new StorageService();} legacyEnv.services.local_storage=mapStorage(browser.localStorage);legacyEnv.services.session_storage=mapStorage(browser.sessionStorage);wowlEnv.bus.on("WEB_CLIENT_READY",null,()=>{legacyEnv.bus.trigger("web_client_ready");});wowlEnv.bus.on("SCROLLER:ANCHOR_LINK_CLICKED",null,(payload)=>{legacyEnv.bus.trigger("SCROLLER:ANCHOR_LINK_CLICKED",payload);});legacyEnv.bus.on("clear_cache",null,()=>{wowlEnv.bus.trigger("CLEAR-CACHES");});} const reBSTooltip=/^bs-.*$/;__exports.cleanDomFromBootstrap=cleanDomFromBootstrap;function cleanDomFromBootstrap(){const body=document.body;const tooltips=body.querySelectorAll("body .tooltip");for(const tt of tooltips){if(Array.from(tt.classList).find((cls)=>reBSTooltip.test(cls))){tt.parentNode.removeChild(tt);}}} __exports.makeLegacyNotificationService=makeLegacyNotificationService;function makeLegacyNotificationService(legacyEnv){return{dependencies:["notification"],start(env){let notifId=0;const idsToRemoveFn={};function notify({title,message,subtitle,buttons=[],sticky,type,className,onClose,}){if(subtitle){title=[title,subtitle].filter(Boolean).join(" ");} if(!message&&title){message=title;title=undefined;} buttons=buttons.map((button)=>{return{name:button.text,icon:button.icon,primary:button.primary,onClick:button.click,};});const removeFn=env.services.notification.add(_.escape(message),{sticky,title,type,className,onClose,buttons,messageIsHtml:true,});const id=++notifId;idsToRemoveFn[id]=removeFn;return id;} function close(id,_,wait){const removeFn=idsToRemoveFn[id];delete idsToRemoveFn[id];if(wait){browser.setTimeout(()=>{removeFn(id);},wait);}else{removeFn(id);}} legacyEnv.services.notification={notify,close};},};} __exports.makeLegacyCrashManagerService=makeLegacyCrashManagerService;function makeLegacyCrashManagerService(legacyEnv){return{dependencies:["dialog"],start(env){legacyEnv.services.crash_manager={show_message(message){env.services.dialog.add(ErrorDialog,{traceback:message});},rpc_error(errorResponse){Promise.reject(makeErrorFromResponse(errorResponse));},};},};} __exports.wrapSuccessOrFail=wrapSuccessOrFail;function wrapSuccessOrFail(promise,{on_success,on_fail}={}){return promise.then(on_success||(()=>{})).catch((reason)=>{let alreadyThrown=false;if(on_fail){alreadyThrown=on_fail(reason)==="alreadyThrown";} if(reason instanceof Error&&!alreadyThrown){throw reason;}});} __exports.makeLegacyRainbowManService=makeLegacyRainbowManService;function makeLegacyRainbowManService(legacyEnv){return{dependencies:["effect"],start(env,{effect}){legacyEnv.bus.on("show-effect",null,(payload)=>{effect.add(payload);});},};} return __exports;});; /* /web/static/src/legacy/js/owl_compatibility.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('web.OwlCompatibility',function(){"use strict";const{Component,hooks,tags}=owl;const{useRef,useSubEnv}=hooks;const{xml}=tags;const widgetSymbol=odoo.widgetSymbol;const children=new WeakMap();const templateForLegacy=tags.xml`
`;const templateForOwl=tags.xml``;class ComponentAdapter extends Component{constructor(parent,props){if(!props.Component){throw Error(`ComponentAdapter: 'Component' prop is missing.`);} let template;if(!(props.Component.prototype instanceof Component)){template=templateForLegacy;}else{template=templateForOwl;} ComponentAdapter.template=template;super(...arguments);this.template=template;ComponentAdapter.template=null;this.widget=null;} get childProps(){if(!this._childProps){this._childProps=Object.assign({},this.props);delete this._childProps.Component;} return this._childProps;} willStart(){if(!(this.props.Component.prototype instanceof Component)){this.widget=new this.props.Component(this,...this.widgetArgs);return this.widget._widgetRenderAndInsert(()=>{});}} willUpdateProps(nextProps){if(this.widget){return this.updateWidget(nextProps);}} __patch(target,vnode){if(this.widget){if(this.__owl__.vnode){this.renderWidget();} vnode.elm=this.widget.el;} const result=super.__patch(...arguments);if(this.widget&&this.el!==this.widget.el){this.__owl__.vnode.elm=this.widget.el;} return result;} mounted(){if(this.widget&&this.widget.on_attach_callback){this.widget.on_attach_callback();}} willUnmount(){if(this.widget&&this.widget.on_detach_callback){this.widget.on_detach_callback();}} __destroy(){super.__destroy(...arguments);if(this.widget){this.widget.destroy();}} get widgetArgs(){if(this.props.widgetArgs){return this.props.widgetArgs;} const args=Object.keys(this.props);args.splice(args.indexOf('Component'),1);if(args.length>1){throw new Error(`ComponentAdapter has more than 1 argument, 'widgetArgs' must be overriden.`);} return args.map(a=>this.props[a]);} updateWidget(){if(this.env.isDebug('assets')){console.warn(`ComponentAdapter: Widget could not be updated, maybe override 'updateWidget' function?`);}} renderWidget(){if(this.env.isDebug('assets')){console.warn(`ComponentAdapter: Widget could not be re-rendered, maybe override 'renderWidget' function?`);}} _trigger_up(ev){const evType=ev.name;const payload=ev.data;if(evType==='call_service'){let args=payload.args||[];if(payload.service==='ajax'&&payload.method==='rpc'){args=args.concat(ev.target);} const service=this.env.services[payload.service];if(service){const result=service[payload.method].apply(service,args);payload.callback(result);}else{throw new Error(`The service "${payload.service}" is not present in the legacy owl environment. You should probably create a mapper in @web/legacy/utils`);}}else if(evType==='get_session'){if(payload.callback){payload.callback(this.env.session);}}else if(evType==='load_views'){const params={model:payload.modelName,context:payload.context,views_descr:payload.views,};this.env.dataManager.load_views(params,payload.options||{}).then(payload.on_success);}else if(evType==='load_filters'){return this.env.dataManager.load_filters(payload).then(payload.on_success);}else{payload.__targetWidget=ev.target;this.trigger(evType.replace(/_/g,'-'),payload);}}} const WidgetAdapterMixin={on_attach_callback(){for(const component of children.get(this)||[]){component.on_attach_callback();}},on_detach_callback(){for(const component of children.get(this)||[]){component.on_detach_callback();}},destroy(){for(const component of children.get(this)||[]){component.env.qweb.off("update",component);component.__destroy();} children.delete(this);},};class ComponentWrapper extends Component{constructor(parent,Component,props){if(parent instanceof Component){throw new Error('ComponentWrapper must be used with a legacy Widget as parent');} super(null,props);if(parent){this._register(parent);} useSubEnv({[widgetSymbol]:this._addListener.bind(this)});this.parentWidget=parent;this.Component=Component;this.props=props||{};this._handledEvents=new Set();this.componentRef=useRef("component");} on_attach_callback(){function recursiveCallMounted(component){const{status,currentFiber}=component.__owl__;if(status===2&¤tFiber&&!currentFiber.isCompleted){return;} if(status!==2&&status!==3&&status!==4){return;} for(const key in component.__owl__.children){recursiveCallMounted(component.__owl__.children[key]);} component.__callMounted();} recursiveCallMounted(this);} on_detach_callback(){this.__callWillUnmount();} destroy(){if(this.parentWidget){const parentChildren=children.get(this.parentWidget);if(parentChildren){const index=parentChildren.indexOf(this);children.get(this.parentWidget).splice(index,1);}} super.destroy();} setParent(parent){if(parent instanceof Component){throw new Error('ComponentWrapper must be used with a legacy Widget as parent');} this._register(parent);if(this.parentWidget){const parentChildren=children.get(this.parentWidget);parentChildren.splice(parentChildren.indexOf(this),1);} this.parentWidget=parent;} async update(props={}){if(this.__owl__.status===5){return new Promise(()=>{});} Object.assign(this.props,props);let prom;if(this.__owl__.status===3){prom=this.render();}else{prom=this.mount(...this._mountArgs);} return prom;} _addListener(evType){if(this.parentWidget&&!this._handledEvents.has(evType)){this._handledEvents.add(evType);this.el.addEventListener(evType,ev=>{if(!ev.cancelBubble){ev.stopPropagation();const detail=Object.assign({},ev.detail,{__originalComponent:ev.originalComponent,});this.parentWidget.trigger_up(ev.type.replace(/-/g,'_'),detail);}});}} _register(parent){let parentChildren=children.get(parent);if(!parentChildren){parentChildren=[];children.set(parent,parentChildren);} parentChildren.push(this);} async mount(target,options){if(options&&options.position==='self'){throw new Error('Unsupported position: "self" is not allowed for wrapper components. '+'Contact the JS Framework team or open an issue if your use case is relevant.');} this._mountArgs=arguments;return super.mount(...arguments);} get $el(){return $(this.el);}} ComponentWrapper.template=xml``;return{ComponentAdapter,ComponentWrapper,WidgetAdapterMixin,};});; /* /web/static/src/legacy/js/services/session.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('web.session',function(require){"use strict";var Session=require('web.Session');var session=new Session(undefined,undefined,{use_cors:false});session.is_bound=session.session_bind();return session;});; /* /web/static/src/legacy/js/public/public_env.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define("web.public_env",function(require){"use strict";const commonEnv=require("web.commonEnv");return commonEnv;});; /* /web/static/src/legacy/js/public/public_root.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/legacy/js/public/public_root',async function(require){'use strict';let __exports={};const ajax=require('web.ajax');const dom=require('web.dom');const env=require('web.public_env');const session=require('web.session');const utils=require('web.utils');const publicWidget=require('web.public.widget');const{registry}=require('@web/core/registry');const AbstractService=require("web.AbstractService");const legacyEnv=require("web.public_env");const lazyloader=require("web.public.lazyloader");const{makeLegacyNotificationService,makeLegacyRpcService,makeLegacySessionService,makeLegacyDialogMappingService,mapLegacyEnvToWowlEnv,makeLegacyRainbowManService,}=require("@web/legacy/utils");const{ComponentAdapter}=require("web.OwlCompatibility");const{loadBundleTemplates}=require("@web/core/assets");const{makeEnv,startServices}=require("@web/env");const{MainComponentsContainer}=require("@web/core/main_components_container");const{browser}=require('@web/core/browser/browser');const{jsonrpc}=require('@web/core/network/rpc_service');const serviceRegistry=registry.category("services");function getLang(){var html=document.documentElement;return(html.getAttribute('lang')||'en_US').replace('-','_');} var lang=utils.get_cookie('frontend_lang')||getLang();var localeDef=lang!=='en_US'?ajax.loadJS('/web/webclient/locale/'+lang.replace('-','_')):Promise.resolve();const PublicRoot=__exports.PublicRoot=publicWidget.RootWidget.extend({events:_.extend({},publicWidget.RootWidget.prototype.events||{},{'submit .js_website_submit_form':'_onWebsiteFormSubmit','click .js_disable_on_click':'_onDisableOnClick',}),custom_events:_.extend({},publicWidget.RootWidget.prototype.custom_events||{},{call_service:'_onCallService',context_get:'_onContextGet',main_object_request:'_onMainObjectRequest',widgets_start_request:'_onWidgetsStartRequest',widgets_stop_request:'_onWidgetsStopRequest',}),init:function(){this._super.apply(this,arguments);this.env=env;this.publicWidgets=[];},willStart:function(){return Promise.all([this._super.apply(this,arguments),session.is_bound,localeDef]);},start:function(){var defs=[this._super.apply(this,arguments),this._startWidgets()];this.$(".o_image[data-mimetype^='image']").each(function(){var $img=$(this);if(/gif|jpe|jpg|png/.test($img.data('mimetype'))&&$img.data('src')){$img.css('background-image',"url('"+$img.data('src')+"')");}});if(window.location.hash.indexOf("scrollTop=")>-1){this.el.scrollTop=+window.location.hash.match(/scrollTop=([0-9]+)/)[1];} if($.fn.placeholder){$('input, textarea').placeholder();} this.$el.children().on('error.datetimepicker',this._onDateTimePickerError.bind(this));return Promise.all(defs);},_getContext:function(context){return _.extend({'lang':getLang(),},context||{});},_getExtraContext:function(context){return this._getContext(context);},_getPublicWidgetsRegistry:function(options){return publicWidget.registry;},_getRegistry:function(){return registry.category("public_root_widgets");},_startWidgets:function($from,options){var self=this;if($from===undefined){$from=this.$('#wrapwrap');if(!$from.length){$from=this.$el;}} options=Object.assign({},options,{wysiwyg:$('#wrapwrap').data('wysiwyg'),});this._stopWidgets($from);var defs=_.map(this._getPublicWidgetsRegistry(options),function(PublicWidget){var selector=PublicWidget.prototype.selector||'';var $target=dom.cssFind($from,selector,true);var defs=_.map($target,function(el){var widget=new PublicWidget(self,options);self.publicWidgets.push(widget);return widget.attachTo($(el));});return Promise.all(defs);});return Promise.all(defs);},_stopWidgets:function($from){var removedWidgets=_.map(this.publicWidgets,function(widget){if(!$from||$from.filter(widget.el).length||$from.find(widget.el).length){widget.destroy();return widget;} return null;});this.publicWidgets=_.difference(this.publicWidgets,removedWidgets);},_onCallService:function(ev){function _computeContext(context,noContextKeys){context=_.extend({},this._getContext(),context);if(noContextKeys){context=_.omit(context,noContextKeys);} return JSON.parse(JSON.stringify(context));} const payload=ev.data;let args=payload.args||[];if(payload.service==='ajax'&&payload.method==='rpc'){args=args.concat(ev.target);var route=args[0];if(_.str.startsWith(route,'/web/dataset/call_kw/')){var params=args[1];var options=args[2];var noContextKeys;if(options){noContextKeys=options.noContextKeys;args[2]=_.omit(options,'noContextKeys');} params.kwargs.context=_computeContext.call(this,params.kwargs.context,noContextKeys);}}else if(payload.service==='ajax'&&payload.method==='loadLibs'){args[1]=_computeContext.call(this,args[1]);}else{return;} const service=this.env.services[payload.service];const result=service[payload.method].apply(service,args);payload.callback(result);ev.stopPropagation();},_onContextGet:function(ev){if(ev.data.extra){ev.data.callback(this._getExtraContext(ev.data.context));}else{ev.data.callback(this._getContext(ev.data.context));}},_onMainObjectRequest:function(ev){var repr=$('html').data('main-object');var m=repr.match(/(.+)\((\d+),(.*)\)/);ev.data.callback({model:m[1],id:m[2]|0,});},_onWidgetsStartRequest:function(ev){this._startWidgets(ev.data.$target,ev.data.options).then(ev.data.onSuccess).guardedCatch(ev.data.onFailure);},_onWidgetsStopRequest:function(ev){this._stopWidgets(ev.data.$target);},_onWebsiteFormSubmit:function(ev){var $buttons=$(ev.currentTarget).find('button[type="submit"], a.a-submit');_.each($buttons,function(btn){var $btn=$(btn);$btn.prepend(' ');$btn.prop('disabled',true);});},_onDisableOnClick:function(ev){$(ev.currentTarget).addClass('disabled');},_onDateTimePickerError:function(ev){return false;},});const{Component,mount}=owl;owl.config.mode=legacyEnv.isDebug()?"dev":"prod";owl.Component.env=legacyEnv;__exports.createPublicRoot=createPublicRoot;async function createPublicRoot(RootWidget){await lazyloader.allScriptsLoaded;AbstractService.prototype.deployServices(legacyEnv);serviceRegistry.add("legacy_rpc",makeLegacyRpcService(legacyEnv));serviceRegistry.add("legacy_session",makeLegacySessionService(legacyEnv,session));serviceRegistry.add("legacy_notification",makeLegacyNotificationService(legacyEnv));serviceRegistry.add("legacy_dialog_mapping",makeLegacyDialogMappingService(legacyEnv));serviceRegistry.add("legacy_rainbowman_service",makeLegacyRainbowManService(legacyEnv));await Promise.all([owl.utils.whenReady(),session.is_bound]);const baseUrl=session.prefix;const{fetch}=browser;browser.fetch=function(url,...args){if(!url.match(/^(?:https?:)?\/\//)){url=baseUrl+url;} return fetch(url,...args);} serviceRegistry.add("rpc",{async:true,start(env){let rpcId=0;return function rpc(route,params={},settings){if(!route.match(/^(?:https?:)?\/\//)){route=baseUrl+route;} return jsonrpc(env,rpcId++,route,params,settings);};},},{force:true});const wowlEnv=makeEnv();wowlEnv.qweb.addTemplates(await loadBundleTemplates("web.assets_frontend"));await startServices(wowlEnv);mapLegacyEnvToWowlEnv(legacyEnv,wowlEnv);const adapter=new ComponentAdapter(null,{Component});const publicRoot=new RootWidget(adapter);await Promise.all([mount(MainComponentsContainer,{target:document.body,env:wowlEnv,}),publicRoot.attachTo(document.body),]);return publicRoot;} __exports[Symbol.for("default")]={PublicRoot,createPublicRoot};return __exports;});odoo.define(`web.public.root`,async function(require){return require('@web/legacy/js/public/public_root')[Symbol.for("default")];});; /* /website/static/src/js/content/website_root_instance.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@website/js/content/website_root_instance',async function(require){'use strict';let __exports={};const{createPublicRoot}=require("@web/legacy/js/public/public_root");const{WebsiteRoot}=require("@website/js/content/website_root");__exports[Symbol.for("default")]=createPublicRoot(WebsiteRoot);return __exports;});odoo.define(`root.widget`,async function(require){return require('@website/js/content/website_root_instance')[Symbol.for("default")];});; /* /web/static/src/legacy/js/public/public_widget.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/legacy/js/public/public_widget',async function(require){'use strict';let __exports={};const dom=require('web.dom');const session=require('web.session');const Widget=require('web.Widget');var RootWidget=Widget.extend({init:function(){this._super.apply(this,arguments);this._widgets=[];},start:function(){var defs=[this._super.apply(this,arguments)];defs.push(this._attachComponents());this._getRegistry().on("UPDATE",this,({operation,value})=>{if(operation==="add"){this._attachComponent(value);}});return Promise.all(defs);},_attachComponent:function(childInfo,$from){var self=this;var $elements=dom.cssFind($from||this.$el,childInfo.selector);var defs=_.map($elements,function(element){var w=new childInfo.Widget(self);self._widgets.push(w);return w.attachTo(element);});return Promise.all(defs);},_attachComponents:function($from){var self=this;var childInfos=this._getRegistry().getAll();var defs=_.map(childInfos,function(childInfo){return self._attachComponent(childInfo,$from);});return Promise.all(defs);},_getRegistry:function(){},});var PublicWidget=Widget.extend({selector:false,events:{},init:function(parent,options){this._super.apply(this,arguments);this.options=options||{};},destroy:function(){if(this.selector){var $oldel=this.$el;this.setElement(null);} this._super.apply(this,arguments);if(this.selector){this.$el=$oldel;this.el=$oldel[0];this.$target=this.$el;this.target=this.el;}},setElement:function(){this._super.apply(this,arguments);if(this.selector){this.$target=this.$el;this.target=this.el;}},_delegateEvents:function(){var self=this;var originalEvents=this.events;var events={};_.each(this.events,function(method,event){if(typeof method!=='string'){events[event]=method;return;} var methodOptions=method.split(' ');if(methodOptions.length<=1){events[event]=method;return;} var isAsync=_.contains(methodOptions,'async');if(!isAsync){events[event]=method;return;} method=self.proxy(methodOptions[methodOptions.length-1]);if(_.str.startsWith(event,'click')){method=dom.makeButtonHandler(method);}else{method=dom.makeAsyncHandler(method);} events[event]=method;});this.events=events;this._super.apply(this,arguments);this.events=originalEvents;},_getContext:function(extra,extraContext){var context;this.trigger_up('context_get',{extra:extra||false,context:extraContext,callback:function(ctx){context=ctx;},});return context;},});var registry={};registry._fixAppleCollapse=PublicWidget.extend({selector:'div[data-toggle="collapse"]',events:{'click':function(){},},});__exports[Symbol.for("default")]={RootWidget:RootWidget,Widget:PublicWidget,registry:registry,};return __exports;});odoo.define(`web.public.widget`,async function(require){return require('@web/legacy/js/public/public_widget')[Symbol.for("default")];});; /* /web/static/src/legacy/legacy_promise_error_handler.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/legacy/legacy_promise_error_handler',async function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");function legacyRejectPromiseHandler(env,error,originalError){if(error.name==="UncaughtPromiseError"){const isLegitError=originalError&&originalError instanceof Error;const isLegacyRPC=originalError&&originalError.legacy;if(!isLegitError&&!isLegacyRPC){error.unhandledRejectionEvent.preventDefault();return true;}} return false;} registry.category("error_handlers").add("legacyRejectPromiseHandler",legacyRejectPromiseHandler,{sequence:1});return __exports;});; /* /web/static/src/legacy/legacy_rpc_error_handler.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('@web/legacy/legacy_rpc_error_handler',async function(require){'use strict';let __exports={};const{registry}=require("@web/core/registry");const{ConnectionLostError,RPCError}=require("@web/core/network/rpc_service");const{lostConnectionHandler,rpcErrorHandler}=require("@web/core/errors/error_handlers");const errorHandlerRegistry=registry.category("error_handlers");function legacyRPCErrorHandler(env,error,originalError){if(originalError&&originalError.legacy&&originalError.message&&(originalError.message instanceof RPCError||originalError.message instanceof ConnectionLostError)){const event=originalError.event;originalError=originalError.message;if(event.isDefaultPrevented()){error.unhandledRejectionEvent.preventDefault();return true;} event.preventDefault();if(originalError instanceof ConnectionLostError){return lostConnectionHandler(env,error,originalError);} return rpcErrorHandler(env,error,originalError);} return false;} errorHandlerRegistry.add("legacyRPCErrorHandler",legacyRPCErrorHandler,{sequence:2});return __exports;});; /* /web/static/src/legacy/frontend/keyboard_navigation_mixin.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('web.KeyboardNavigationMixin',function(require){"use strict";var BrowserDetection=require('web.BrowserDetection');const core=require('web.core');var knownUnusableAccessKeys=[' ','A','B','C','H','J','K','L','N','P','S','Q','E','F','D','0','1','2','3','4','5','6','7','8','9'];var KeyboardNavigationMixin={events:{'keydown':'_onKeyDown','keyup':'_onKeyUp',},init:function(options){this.options=Object.assign({autoAccessKeys:true,skipRenderOverlay:false,},options);this._areAccessKeyVisible=false;this.BrowserDetection=new BrowserDetection();},start:function(){const temp=this._hideAccessKeyOverlay.bind(this);this._hideAccessKeyOverlay=()=>temp();window.addEventListener('blur',this._hideAccessKeyOverlay);core.bus.on('click',null,this._hideAccessKeyOverlay);},destroy:function(){window.removeEventListener('blur',this._hideAccessKeyOverlay);core.bus.off('click',null,this._hideAccessKeyOverlay);},_addAccessKeyOverlays:function(){if(this.options.skipRenderOverlay){return;} var accesskeyElements=$(document).find('[accesskey]').filter(':visible');_.each(accesskeyElements,function(elem){var overlay=$(_.str.sprintf("
%s
",$(elem).attr('accesskey').toUpperCase()));var $overlayParent;if(elem.tagName.toUpperCase()==="INPUT"){$overlayParent=$(elem).parent();}else{$overlayParent=$(elem);} if($overlayParent.css('position')!=='absolute'){$overlayParent.css('position','relative');} overlay.appendTo($overlayParent);});},_getAllUsedAccessKeys:function(){var usedAccessKeys=knownUnusableAccessKeys.slice();this.$el.find('[accesskey]').each(function(_,elem){usedAccessKeys.push(elem.accessKey.toUpperCase());});return usedAccessKeys;},_hideAccessKeyOverlay:function(){this._areAccessKeyVisible=false;var overlays=this.$el.find('.o_web_accesskey_overlay');if(overlays.length){return overlays.remove();}},_setAccessKeyOnTopNavigation:function(){this.$el.find('.o_menu_sections>li>a').each(function(number,item){item.accessKey=number+1;});},_onKeyDown:function(keyDownEvent){if($('body.o_ui_blocked').length&&(keyDownEvent.altKey||keyDownEvent.key==='Alt')&&!keyDownEvent.ctrlKey){if(keyDownEvent.preventDefault)keyDownEvent.preventDefault();else keyDownEvent.returnValue=false;if(keyDownEvent.stopPropagation)keyDownEvent.stopPropagation();if(keyDownEvent.cancelBubble)keyDownEvent.cancelBubble=true;return false;} if(!this._areAccessKeyVisible&&(keyDownEvent.altKey||keyDownEvent.key==='Alt')&&!keyDownEvent.ctrlKey){this._areAccessKeyVisible=true;this._setAccessKeyOnTopNavigation();var usedAccessKey=this._getAllUsedAccessKeys();if(this.options.autoAccessKeys){var buttonsWithoutAccessKey=this.$el.find('button.btn:visible').not('[accesskey]').not('[disabled]').not('[tabindex="-1"]');_.each(buttonsWithoutAccessKey,function(elem){var buttonString=[elem.innerText,elem.title,"ABCDEFGHIJKLMNOPQRSTUVWXYZ"].join('');for(var letterIndex=0;letterIndex='A'&&candidateAccessKey<='Z'&&!_.includes(usedAccessKey,candidateAccessKey)){elem.accessKey=candidateAccessKey;usedAccessKey.push(candidateAccessKey);break;}}});} var elementsWithoutAriaKeyshortcut=this.$el.find('[accesskey]').not('[aria-keyshortcuts]');_.each(elementsWithoutAriaKeyshortcut,function(elem){elem.setAttribute('aria-keyshortcuts','Alt+Shift+'+elem.accessKey);});this._addAccessKeyOverlays();} if(this.BrowserDetection.isOsMac()) return;if(keyDownEvent.altKey&&!keyDownEvent.ctrlKey&&keyDownEvent.key.length===1){var elementWithAccessKey=[];if(keyDownEvent.keyCode>=65&&keyDownEvent.keyCode<=90||keyDownEvent.keyCode>=97&&keyDownEvent.keyCode<=122){elementWithAccessKey=document.querySelectorAll('[accesskey="'+String.fromCharCode(keyDownEvent.keyCode).toLowerCase()+'"], [accesskey="'+String.fromCharCode(keyDownEvent.keyCode).toUpperCase()+'"]');if(elementWithAccessKey.length){if(this.BrowserDetection.isOsMac()||!this.BrowserDetection.isBrowserChrome()){elementWithAccessKey[0].focus();elementWithAccessKey[0].click();if(keyDownEvent.preventDefault)keyDownEvent.preventDefault();else keyDownEvent.returnValue=false;if(keyDownEvent.stopPropagation)keyDownEvent.stopPropagation();if(keyDownEvent.cancelBubble)keyDownEvent.cancelBubble=true;return false;}}} else{var numberKey;if(keyDownEvent.originalEvent.code&&keyDownEvent.originalEvent.code.indexOf('Digit')===0){numberKey=keyDownEvent.originalEvent.code[keyDownEvent.originalEvent.code.length-1];}else if(keyDownEvent.originalEvent.key&&keyDownEvent.originalEvent.key.length===1&&keyDownEvent.originalEvent.key>='0'&&keyDownEvent.originalEvent.key<='9'){numberKey=keyDownEvent.originalEvent.key;}else if(keyDownEvent.keyCode>=48&&keyDownEvent.keyCode<=57){numberKey=keyDownEvent.keyCode-48;} if(numberKey>='0'&&numberKey<='9'){elementWithAccessKey=document.querySelectorAll('[accesskey="'+numberKey+'"]');if(elementWithAccessKey.length){elementWithAccessKey[0].click();if(keyDownEvent.preventDefault)keyDownEvent.preventDefault();else keyDownEvent.returnValue=false;if(keyDownEvent.stopPropagation)keyDownEvent.stopPropagation();if(keyDownEvent.cancelBubble)keyDownEvent.cancelBubble=true;return false;}}}}},_onKeyUp:function(keyUpEvent){if((keyUpEvent.altKey||keyUpEvent.key==='Alt')&&!keyUpEvent.ctrlKey){if(this.options.skipRenderOverlay){return;} this._hideAccessKeyOverlay();if(keyUpEvent.preventDefault)keyUpEvent.preventDefault();else keyUpEvent.returnValue=false;if(keyUpEvent.stopPropagation)keyUpEvent.stopPropagation();if(keyUpEvent.cancelBubble)keyUpEvent.cancelBubble=true;return false;}},};return KeyboardNavigationMixin;});; /* /bus/static/src/js/longpolling_bus.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('bus.Longpolling',function(require){"use strict";var Bus=require('web.Bus');var ServicesMixin=require('web.ServicesMixin');var LongpollingBus=Bus.extend(ServicesMixin,{PARTNERS_PRESENCE_CHECK_PERIOD:30000,ERROR_RETRY_DELAY:10000,POLL_ROUTE:'/longpolling/poll',_isActive:null,_lastNotificationID:0,_isOdooFocused:true,_pollRetryTimeout:null,init:function(parent,params){this._super.apply(this,arguments);this._id=_.uniqueId('bus');this._longPollingBusId=this._id;this._options={};this._channels=[];this._lastPresenceTime=new Date().getTime();$(window).on("focus."+this._longPollingBusId,this._onFocusChange.bind(this,{focus:true}));$(window).on("blur."+this._longPollingBusId,this._onFocusChange.bind(this,{focus:false}));$(window).on("unload."+this._longPollingBusId,this._onFocusChange.bind(this,{focus:false}));$(window).on("click."+this._longPollingBusId,this._onPresence.bind(this));$(window).on("keydown."+this._longPollingBusId,this._onPresence.bind(this));$(window).on("keyup."+this._longPollingBusId,this._onPresence.bind(this));},destroy:function(){this.stopPolling();$(window).off("focus."+this._longPollingBusId);$(window).off("blur."+this._longPollingBusId);$(window).off("unload."+this._longPollingBusId);$(window).off("click."+this._longPollingBusId);$(window).off("keydown."+this._longPollingBusId);$(window).off("keyup."+this._longPollingBusId);this._super();},addChannel:function(channel){if(this._channels.indexOf(channel)===-1){this._channels.push(channel);this._restartPolling();}},deleteChannel:function(channel){var index=this._channels.indexOf(channel);if(index!==-1){this._channels.splice(index,1);if(this._pollRpc){this._pollRpc.abort();}}},isOdooFocused:function(){return this._isOdooFocused;},startPolling:function(){if(this._isActive===null){this._poll=this._poll.bind(this);} if(!this._isActive){this._isActive=true;this._poll();}},stopPolling:function(){this._isActive=false;this._channels=[];clearTimeout(this._pollRetryTimeout);if(this._pollRpc){this._pollRpc.abort();}},updateOption:function(key,value){this._options[key]=value;},_getLastPresence:function(){return this._lastPresenceTime;},_poll:function(){var self=this;if(!this._isActive){return;} var now=new Date().getTime();var options=_.extend({},this._options,{bus_inactivity:now-this._getLastPresence(),});var data={channels:this._channels,last:this._lastNotificationID,options:options};this._pollRpc=this._makePoll(data);this._pollRpc.then(function(result){self._pollRpc=false;self._onPoll(result);self._poll();}).guardedCatch(function(result){self._pollRpc=false;result.event.preventDefault();if(result.message==="XmlHttpRequestError abort"){self._poll();}else{self._pollRetryTimeout=setTimeout(self._poll,self.ERROR_RETRY_DELAY+(Math.floor((Math.random()*20)+1)*1000));}});},_makePoll:function(data){return this._rpc({route:this.POLL_ROUTE,params:data},{shadow:true,timeout:60000});},_onFocusChange:function(params){this._isOdooFocused=params.focus;if(params.focus){this._lastPresenceTime=new Date().getTime();this.trigger('window_focus',this._isOdooFocused);}},_onPoll:function(notifications){var self=this;var notifs=_.map(notifications,function(notif){if(notif.id>self._lastNotificationID){self._lastNotificationID=notif.id;} return notif.message;});this.trigger("notification",notifs);return notifs;},_onPresence:function(){this._lastPresenceTime=new Date().getTime();},_restartPolling(){if(this._pollRpc){this._pollRpc.abort();}else{this.startPolling();}},});return LongpollingBus;});; /* /bus/static/src/js/crosstab_bus.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('bus.CrossTab',function(require){"use strict";var Longpolling=require('bus.Longpolling');var session=require('web.session');var CrossTabBus=Longpolling.extend({TAB_HEARTBEAT_PERIOD:10000,MASTER_TAB_HEARTBEAT_PERIOD:1500,HEARTBEAT_OUT_OF_DATE_PERIOD:5000,HEARTBEAT_KILL_OLD_PERIOD:15000,LOCAL_STORAGE_PREFIX:'bus',_isMasterTab:false,_isRegistered:false,init:function(){this._super.apply(this,arguments);var now=new Date().getTime();this._sanitizedOrigin=session.origin.replace(/:\/{0,2}/g,'_');this._currentTabChannels=new Set();this._id=_.uniqueId(this.LOCAL_STORAGE_PREFIX)+':'+now;if(this._callLocalStorage('getItem','last_ts',0)+50000now){cleanedPeers[peerName]=peers[peerName];}} if(heartbeatValue!==this.lastHeartbeat){this._isMasterTab=false;this.lastHeartbeat=0;peers[this._id]=now;this._callLocalStorage('setItem','peers',peers);this.stopPolling();this.trigger('no_longer_master');}else{this.lastHeartbeat=now;this._callLocalStorage('setItem','heartbeat',now);this._callLocalStorage('setItem','peers',cleanedPeers);}}else{peers[this._id]=now;this._callLocalStorage('setItem','peers',peers);} var hbPeriod=this._isMasterTab?this.MASTER_TAB_HEARTBEAT_PERIOD:this.TAB_HEARTBEAT_PERIOD;if(this._lastPresenceTime+hbPeriod>now){this._callLocalStorage('setItem','lastPresence',this._lastPresenceTime);} this._heartbeatTimeout=setTimeout(this._heartbeat.bind(this),hbPeriod);},_registerWindowUnload:function(){$(window).on('unload.'+this._id,this._onUnload.bind(this));},_startElection:function(){if(this._isMasterTab){return;} var now=new Date().getTime();var peers=this._callLocalStorage('getItem','peers',{});var heartbeatKillOld=now-this.HEARTBEAT_KILL_OLD_PERIOD;var newMaster;for(var peerName in peers){if(peers[peerName]-1){this.displayNotification(options);this._beep();}else{throw error;}}}}else{this.displayNotification(options);if(this.isMasterTab()){this._beep();}}},onNotification:function(){this.on.apply(this,["notification"].concat(Array.prototype.slice.call(arguments)));},_beep:function(){if(typeof(Audio)!=="undefined"){if(!this._audio){this._audio=new Audio();var ext=this._audio.canPlayType("audio/ogg; codecs=vorbis")?".ogg":".mp3";this._audio.src=session.url("/mail/static/src/audio/ting"+ext);} Promise.resolve(this._audio.play()).catch(_.noop);}},_sendNativeNotification:function(title,content,callback){var notification=new Notification(_.unescape(title),{body:_.unescape(content),icon:"/mail/static/src/img/odoobot_transparent.png"});notification.onclick=function(){window.focus();if(this.cancel){this.cancel();}else if(this.close){this.close();} if(callback){callback();}};},});core.serviceRegistry.add('bus_service',BusService);return BusService;});; /* /web_tour/static/src/js/public/tour_manager.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('web_tour.public.TourManager',function(require){'use strict';var TourManager=require('web_tour.TourManager');var lazyloader=require('web.public.lazyloader');TourManager.include({_waitBeforeTourStart:function(){return this._super.apply(this,arguments).then(function(){return lazyloader.allScriptsLoaded;}).then(function(){return new Promise(function(resolve){setTimeout(resolve);});});},});});; /* /web_editor/static/src/js/wysiwyg/dialog.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('wysiwyg.widgets.Dialog',function(require){'use strict';var config=require('web.config');var core=require('web.core');var Dialog=require('web.Dialog');var _t=core._t;var WysiwygDialog=Dialog.extend({init:function(parent,options){this.options=options||{};if(config.device.isMobile){options.fullscreen=true;} this._super(parent,_.extend({},{buttons:[{text:this.options.save_text||_t("Save"),classes:'btn-primary',click:this.save,},{text:_t("Discard"),close:true,}]},this.options));this.destroyAction='cancel';var self=this;this.opened(function(){self.$('input:visible:first').focus();self.$el.closest('.modal').addClass('o_web_editor_dialog');self.$el.closest('.modal').on('hidden.bs.modal',self.options.onClose);});this.on('closed',this,function(){self._toggleFullScreen();this.trigger(this.destroyAction,this.final_data||null);});},_toggleFullScreen:function(){if(config.device.isMobile&&!this.hasFullScreen){$('#iframe_target[isMobile="true"] #web_editor-top-edit .o_fullscreen').click();}},save:function(){this.destroyAction="save";this.close();},open:function(){this.hasFullScreen=$(window.top.document.body).hasClass('o_field_widgetTextHtml_fullscreen');this._toggleFullScreen();return this._super.apply(this,arguments);},});return WysiwygDialog;});; /* /web_editor/static/src/js/frontend/loader.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('web_editor.loader',function(require){'use strict';var ajax=require('web.ajax');let wysiwygPromise;const exports={};function loadWysiwyg(additionnalAssets=[]){return ajax.loadLibs({assetLibs:['web_editor.compiled_assets_wysiwyg',...additionnalAssets]},undefined,'/web_editor/public_render_template');} exports.loadWysiwyg=loadWysiwyg;exports.createWysiwyg=async(parent,options,additionnalAssets=[])=>{const wysiwygAlias=options.wysiwygAlias||'web_editor.wysiwyg';if(!wysiwygPromise){wysiwygPromise=new Promise(async(resolve)=>{await loadWysiwyg(additionnalAssets);const stringFunction=`return new Promise(resolve => { odoo.define('${wysiwygAlias}.loaded', require => { `+'require'+`('${wysiwygAlias}'); resolve(); }); });`;await new Function(stringFunction)();resolve();});} await wysiwygPromise;const Wysiwyg=odoo.__DEBUG__.services[wysiwygAlias];return new Wysiwyg(parent,options);};exports.loadFromTextarea=async(parent,textarea,options)=>{var loading=textarea.nextElementSibling;if(loading&&!loading.classList.contains('o_wysiwyg_loading')){loading=null;} const $textarea=$(textarea);const currentOptions=Object.assign({},options);currentOptions.value=currentOptions.value||$textarea.val()||'';if(!currentOptions.value.trim()){currentOptions.value='


';} const wysiwyg=await exports.createWysiwyg(parent,currentOptions);const $wysiwygWrapper=$textarea.closest('.o_wysiwyg_textarea_wrapper');const $form=$textarea.closest('form');$textarea.hide();$form.append($textarea);$wysiwygWrapper.html('');await wysiwyg.appendTo($wysiwygWrapper);$form.find('.note-editable').data('wysiwyg',wysiwyg);$form.find('.note-editable').find('img.o_we_selected_image').removeClass('o_we_selected_image');$form.on('click','button[type=submit]',(e)=>{$form.find('.note-editable').find('img.o_we_selected_image').removeClass('o_we_selected_image');$form.find('.note-editable').find('img.float-left').removeClass('float-left');$textarea.html(wysiwyg.getValue());});return wysiwyg;};return exports;});; /* /auth_signup/static/src/js/signup.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('auth_signup.signup',function(require){'use strict';var publicWidget=require('web.public.widget');publicWidget.registry.SignUpForm=publicWidget.Widget.extend({selector:'.oe_signup_form',events:{'submit':'_onSubmit',},_onSubmit:function(){var $btn=this.$('.oe_login_buttons > button[type="submit"]');$btn.attr('disabled','disabled');$btn.prepend(' ');},});});; /* /portal/static/src/js/portal.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('portal.portal',function(require){'use strict';var publicWidget=require('web.public.widget');const Dialog=require('web.Dialog');const{_t,qweb}=require('web.core');const ajax=require('web.ajax');const session=require('web.session');publicWidget.registry.portalDetails=publicWidget.Widget.extend({selector:'.o_portal_details',events:{'change select[name="country_id"]':'_onCountryChange',},start:function(){var def=this._super.apply(this,arguments);this.$state=this.$('select[name="state_id"]');this.$stateOptions=this.$state.filter(':enabled').find('option:not(:first)');this._adaptAddressForm();return def;},_adaptAddressForm:function(){var $country=this.$('select[name="country_id"]');var countryID=($country.val()||0);this.$stateOptions.detach();var $displayedState=this.$stateOptions.filter('[data-country_id='+countryID+']');var nb=$displayedState.appendTo(this.$state).show().length;this.$state.parent().toggle(nb>=1);},_onCountryChange:function(){this._adaptAddressForm();},});publicWidget.registry.PortalHomeCounters=publicWidget.Widget.extend({selector:'.o_portal_my_home',start:function(){var def=this._super.apply(this,arguments);this._updateCounters();return def;},async _updateCounters(elem){const numberRpc=3;const needed=this.$('[data-placeholder_count]').map((i,o)=>$(o).data('placeholder_count')).toArray();const counterByRpc=Math.ceil(needed.length/numberRpc);const proms=[...Array(Math.min(numberRpc,needed.length)).keys()].map(async i=>{await this._rpc({route:"/my/counters",params:{counters:needed.slice(i*counterByRpc,(i+1)*counterByRpc)},}).then(data=>{Object.keys(data).map(k=>this.$("[data-placeholder_count='"+k+"']").text(data[k]));});});return Promise.all(proms);},});publicWidget.registry.portalSearchPanel=publicWidget.Widget.extend({selector:'.o_portal_search_panel',events:{'click .dropdown-item':'_onDropdownItemClick','submit':'_onSubmit',},start:function(){var def=this._super.apply(this,arguments);this._adaptSearchLabel(this.$('.dropdown-item.active'));return def;},_adaptSearchLabel:function(elem){var $label=$(elem).clone();$label.find('span.nolabel').remove();this.$('input[name="search"]').attr('placeholder',$label.text().trim());},_search:function(){var search=$.deparam(window.location.search.substring(1));search['search_in']=this.$('.dropdown-item.active').attr('href').replace('#','');search['search']=this.$('input[name="search"]').val();window.location.search=$.param(search);},_onDropdownItemClick:function(ev){ev.preventDefault();var $item=$(ev.currentTarget);$item.closest('.dropdown-menu').find('.dropdown-item').removeClass('active');$item.addClass('active');this._adaptSearchLabel(ev.currentTarget);},_onSubmit:function(ev){ev.preventDefault();this._search();},});publicWidget.registry.NewAPIKeyButton=publicWidget.Widget.extend({selector:'.o_portal_new_api_key',events:{click:'_onClick'},async _onClick(e){e.preventDefault();await handleCheckIdentity(this.proxy('_rpc'),this._rpc({model:'res.users',method:'api_key_wizard',args:[session.user_id],}));await ajax.loadXML('/portal/static/src/xml/portal_security.xml',qweb);const self=this;const d_description=new Dialog(self,{title:_t('New API Key'),$content:qweb.render('portal.keydescription'),buttons:[{text:_t('Confirm'),classes:'btn-primary',close:true,click:async()=>{var description=d_description.el.querySelector('[name="description"]').value;var wizard_id=await this._rpc({model:'res.users.apikeys.description',method:'create',args:[{name:description}],});var res=await handleCheckIdentity(this.proxy('_rpc'),this._rpc({model:'res.users.apikeys.description',method:'make_key',args:[wizard_id],}));const d_show=new Dialog(self,{title:_t('API Key Ready'),$content:qweb.render('portal.keyshow',{key:res.context.default_key}),buttons:[{text:_t('Close'),clases:'btn-primary',close:true}],});d_show.on('closed',this,()=>{window.location=window.location;});d_show.open();}},{text:_t('Discard'),close:true}],});d_description.opened(()=>{const input=d_description.el.querySelector('[name="description"]');input.focus();d_description.el.addEventListener('submit',(e)=>{e.preventDefault();d_description.$footer.find('.btn-primary').click();});});d_description.open();}});publicWidget.registry.RemoveAPIKeyButton=publicWidget.Widget.extend({selector:'.o_portal_remove_api_key',events:{click:'_onClick'},async _onClick(e){e.preventDefault();await handleCheckIdentity(this.proxy('_rpc'),this._rpc({model:'res.users.apikeys',method:'remove',args:[parseInt(this.target.id)]}));window.location=window.location;}});function handleCheckIdentity(rpc,wrapped){return wrapped.then((r)=>{if(!_.isMatch(r,{type:'ir.actions.act_window',res_model:'res.users.identitycheck'})){return r;} const check_id=r.res_id;return ajax.loadXML('/portal/static/src/xml/portal_security.xml',qweb).then(()=>new Promise((resolve,reject)=>{const d=new Dialog(null,{title:_t("Security Control"),$content:qweb.render('portal.identitycheck'),buttons:[{text:_t("Confirm Password"),classes:'btn btn-primary',click(){const password_input=this.el.querySelector('[name=password]');if(!password_input.reportValidity()){password_input.classList.add('is-invalid');return;} return rpc({model:'res.users.identitycheck',method:'write',args:[check_id,{password:password_input.value}]}).then(()=>rpc({model:'res.users.identitycheck',method:'run_check',args:[check_id]})).then((r)=>{this.close();resolve(r);},(err)=>{err.event.preventDefault();password_input.classList.add('is-invalid');password_input.setCustomValidity(_t("Check failed"));password_input.reportValidity();});}},{text:_t('Cancel'),close:true}]}).on('close',null,()=>{reject();});d.opened(()=>{const pw=d.el.querySelector('[name="password"]');pw.focus();pw.addEventListener('input',()=>{pw.classList.remove('is-invalid');pw.setCustomValidity('');});d.el.addEventListener('submit',(e)=>{e.preventDefault();d.$footer.find('.btn-primary').click();});});d.open();}));});} return{handleCheckIdentity,}});; /* /portal/static/src/js/portal_chatter.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('portal.chatter',function(require){'use strict';var core=require('web.core');const dom=require('web.dom');var publicWidget=require('web.public.widget');var time=require('web.time');var portalComposer=require('portal.composer');const{Markup}=require('web.utils');var qweb=core.qweb;var _t=core._t;var PortalChatter=publicWidget.Widget.extend({template:'portal.Chatter',xmlDependencies:['/portal/static/src/xml/portal_chatter.xml'],events:{'click .o_portal_chatter_pager_btn':'_onClickPager','click .o_portal_chatter_js_is_internal':'async _onClickUpdateIsInternal',},init:function(parent,options){var self=this;this.options={};this._super.apply(this,arguments);this._setOptions(options);this.set('messages',[]);this.set('message_count',this.options['message_count']);this.set('pager',{});this.set('domain',this.options['domain']);this._currentPage=this.options['pager_start'];},willStart:function(){return Promise.all([this._super.apply(this,arguments),this._chatterInit()]);},start:function(){this.on("change:messages",this,this._renderMessages);this.on("change:message_count",this,function(){this._renderMessageCount();this.set('pager',this._pager(this._currentPage));});this.on("change:pager",this,this._renderPager);this.on("change:domain",this,this._onChangeDomain);this.set('message_count',this.options['message_count']);this.set('messages',this.preprocessMessages(this.result['messages']));core.bus.on('reload_chatter_content',this,this._reloadChatterContent);return Promise.all([this._super.apply(this,arguments),this._reloadComposer()]);},messageFetch:function(domain){var self=this;return this._rpc({route:'/mail/chatter_fetch',params:self._messageFetchPrepareParams(),}).then(function(result){self.set('messages',self.preprocessMessages(result['messages']));self.set('message_count',result['message_count']);return result;});},preprocessMessages(messages){_.each(messages,function(m){m['author_avatar_url']=_.str.sprintf('/web/image/%s/%s/author_avatar/50x50','mail.message',m.id);m['published_date_str']=_.str.sprintf(_t('Published on %s'),moment(time.str_to_datetime(m.date)).format('MMMM Do YYYY, h:mm:ss a'));m['body']=Markup(m.body);});return messages;},_setOptions:function(options){const defaultOptions=Object.assign({'allow_composer':true,'display_composer':false,'csrf_token':odoo.csrf_token,'message_count':0,'pager_step':10,'pager_scope':5,'pager_start':1,'is_user_public':true,'is_user_employee':false,'is_user_publisher':false,'hash':false,'pid':false,'domain':[],'two_columns':false,},this.options||{});this.options=Object.entries(options).reduce((acc,[key,value])=>{acc[_.str.underscored(key)]=value;return acc;},defaultOptions);},_reloadChatterContent:function(data){this.messageFetch();this._reloadComposer();},_createComposerWidget:function(){return new portalComposer.PortalComposer(this,this.options);},_reloadComposer:async function(){if(this._composer){this._composer.destroy();} if(this.options.display_composer){this._composer=this._createComposerWidget();await this._composer.appendTo(this.$('.o_portal_chatter_composer'));}},_chatterInit:function(){var self=this;return this._rpc({route:'/mail/chatter_init',params:this._messageFetchPrepareParams()}).then(function(result){self.result=result;self.options=_.extend(self.options,self.result['options']||{});return result;});},_changeCurrentPage:function(page,domain){this._currentPage=page;var d=domain?domain:_.clone(this.get('domain'));this.set('domain',d);},_messageFetchPrepareParams:function(){var self=this;var data={'res_model':this.options['res_model'],'res_id':this.options['res_id'],'limit':this.options['pager_step'],'offset':(this._currentPage-1)*this.options['pager_step'],'allow_composer':this.options['allow_composer'],};if(self.options['token']){data['token']=self.options['token'];} if(this.get('domain')){data['domain']=this.get('domain');} return data;},_pager:function(page){page=page||1;var total=this.get('message_count');var scope=this.options['pager_scope'];var step=this.options['pager_step'];var pageCount=Math.ceil(parseFloat(total)/step);page=Math.max(1,Math.min(parseInt(page),pageCount));scope-=1;var pmin=Math.max(page-parseInt(Math.floor(scope/2)),1);var pmax=Math.min(pmin+scope,pageCount);if(pmax-scope>0){pmin=pmax-scope;}else{pmin=1;} var pages=[];_.each(_.range(pmin,pmax+1),function(index){pages.push(index);});return{"page_count":pageCount,"offset":(page-1)*step,"page":page,"page_start":pmin,"page_previous":Math.max(pmin,page-1),"page_next":Math.min(pmax,page+1),"page_end":pmax,"pages":pages};},_renderMessages:function(){this.$('.o_portal_chatter_messages').html(qweb.render("portal.chatter_messages",{widget:this}));},_renderMessageCount:function(){this.$('.o_message_counter').replaceWith(qweb.render("portal.chatter_message_count",{widget:this}));},_renderPager:function(){this.$('.o_portal_chatter_pager').replaceWith(qweb.render("portal.pager",{widget:this}));},_onChangeDomain:function(){var self=this;this.messageFetch().then(function(){var p=self._currentPage;self.set('pager',self._pager(p));});},_onClickPager:function(ev){ev.preventDefault();var page=$(ev.currentTarget).data('page');this._changeCurrentPage(page);},_onClickUpdateIsInternal:function(ev){ev.preventDefault();var $elem=$(ev.currentTarget);return this._rpc({route:'/mail/update_is_internal',params:{message_id:$elem.data('message-id'),is_internal:!$elem.data('is-internal'),},}).then(function(result){$elem.data('is-internal',result);if(result===true){$elem.addClass('o_portal_message_internal_on');$elem.removeClass('o_portal_message_internal_off');}else{$elem.addClass('o_portal_message_internal_off');$elem.removeClass('o_portal_message_internal_on');}});},});publicWidget.registry.portalChatter=publicWidget.Widget.extend({selector:'.o_portal_chatter',async start(){const proms=[this._super.apply(this,arguments)];const chatter=new PortalChatter(this,this.$el.data());proms.push(chatter.appendTo(this.$el));await Promise.all(proms);if(window.location.hash===`#${this.el.id}`){dom.scrollTo(this.el,{duration:0});}},});return{PortalChatter:PortalChatter,};});; /* /portal/static/src/js/portal_composer.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('portal.composer',function(require){'use strict';var ajax=require('web.ajax');var core=require('web.core');var publicWidget=require('web.public.widget');var qweb=core.qweb;var _t=core._t;var PortalComposer=publicWidget.Widget.extend({template:'portal.Composer',xmlDependencies:['/portal/static/src/xml/portal_chatter.xml'],events:{'change .o_portal_chatter_file_input':'_onFileInputChange','click .o_portal_chatter_attachment_btn':'_onAttachmentButtonClick','click .o_portal_chatter_attachment_delete':'async _onAttachmentDeleteClick','click .o_portal_chatter_composer_btn':'async _onSubmitButtonClick',},init:function(parent,options){this._super.apply(this,arguments);this.options=_.defaults(options||{},{'allow_composer':true,'display_composer':false,'csrf_token':odoo.csrf_token,'token':false,'res_model':false,'res_id':false,});this.attachments=[];},start:function(){var self=this;this.$attachmentButton=this.$('.o_portal_chatter_attachment_btn');this.$fileInput=this.$('.o_portal_chatter_file_input');this.$sendButton=this.$('.o_portal_chatter_composer_btn');this.$attachments=this.$('.o_portal_chatter_composer_input .o_portal_chatter_attachments');this.$inputTextarea=this.$('.o_portal_chatter_composer_input textarea[name="message"]');return this._super.apply(this,arguments).then(function(){if(self.options.default_attachment_ids){self.attachments=self.options.default_attachment_ids||[];_.each(self.attachments,function(attachment){attachment.state='done';});self._updateAttachments();} return Promise.resolve();});},_onAttachmentButtonClick:function(){this.$fileInput.click();},_onAttachmentDeleteClick:function(ev){var self=this;var attachmentId=$(ev.currentTarget).closest('.o_portal_chatter_attachment').data('id');var accessToken=_.find(this.attachments,{'id':attachmentId}).access_token;ev.preventDefault();ev.stopPropagation();this.$sendButton.prop('disabled',true);return this._rpc({route:'/portal/attachment/remove',params:{'attachment_id':attachmentId,'access_token':accessToken,},}).then(function(){self.attachments=_.reject(self.attachments,{'id':attachmentId});self._updateAttachments();self.$sendButton.prop('disabled',false);});},_prepareAttachmentData:function(file){return{'name':file.name,'file':file,'res_id':this.options.res_id,'res_model':this.options.res_model,'access_token':this.options.token,};},_onFileInputChange:function(){var self=this;this.$sendButton.prop('disabled',true);return Promise.all(_.map(this.$fileInput[0].files,function(file){return new Promise(function(resolve,reject){var data=self._prepareAttachmentData(file);ajax.post('/portal/attachment/add',data).then(function(attachment){attachment.state='pending';self.attachments.push(attachment);self._updateAttachments();resolve();}).guardedCatch(function(error){self.displayNotification({message:_.str.sprintf(_t("Could not save file %s"),_.escape(file.name)),type:'warning',sticky:true,});resolve();});});})).then(function(){self.$fileInput[0].value=null;self.$sendButton.prop('disabled',false);});},_prepareMessageData:function(){return Object.assign(this.options||{},{'message':this.$('textarea[name="message"]').val(),'attachment_ids':_.pluck(this.attachments,'id'),'attachment_tokens':_.pluck(this.attachments,'access_token'),});},_onSubmitButtonClick:function(ev){ev.preventDefault();if(!this.$inputTextarea.val().trim()&&!this.attachments.length){this.$inputTextarea.addClass('border-danger');const error=_t('Some fields are required. Please make sure to write a message or attach a document');this.$(".o_portal_chatter_composer_error").text(error).removeClass('d-none');return Promise.reject();}else{return this._chatterPostMessage(ev.currentTarget.getAttribute('data-action'));}},_updateAttachments:function(){this.$attachments.html(qweb.render('portal.Chatter.Attachments',{attachments:this.attachments,showDelete:true,}));},_chatterPostMessage:async function(route){const result=await this._rpc({route:route,params:this._prepareMessageData(),});core.bus.trigger('reload_chatter_content',result);return result;},});return{PortalComposer:PortalComposer,};});; /* /portal/static/src/js/portal_signature.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('portal.signature_form',function(require){'use strict';var core=require('web.core');var publicWidget=require('web.public.widget');var NameAndSignature=require('web.name_and_signature').NameAndSignature;var qweb=core.qweb;var _t=core._t;var SignatureForm=publicWidget.Widget.extend({template:'portal.portal_signature',xmlDependencies:['/portal/static/src/xml/portal_signature.xml'],events:{'click .o_portal_sign_submit':'async _onClickSignSubmit',},custom_events:{'signature_changed':'_onChangeSignature',},init:function(parent,options){this._super.apply(this,arguments);this.csrf_token=odoo.csrf_token;this.callUrl=options.callUrl||'';this.rpcParams=options.rpcParams||{};this.sendLabel=options.sendLabel||_t("Accept & Sign");this.nameAndSignature=new NameAndSignature(this,options.nameAndSignatureOptions||{});},start:function(){var self=this;this.$confirm_btn=this.$('.o_portal_sign_submit');this.$controls=this.$('.o_portal_sign_controls');var subWidgetStart=this.nameAndSignature.replace(this.$('.o_web_sign_name_and_signature'));return Promise.all([subWidgetStart,this._super.apply(this,arguments)]).then(function(){self.nameAndSignature.resetSignature();});},focusName:function(){this.nameAndSignature.focusName();},resetSignature:function(){return this.nameAndSignature.resetSignature();},_onClickSignSubmit:function(ev){var self=this;ev.preventDefault();if(!this.nameAndSignature.validateSignature()){return;} var name=this.nameAndSignature.getName();var signature=this.nameAndSignature.getSignatureImage()[1];return this._rpc({route:this.callUrl,params:_.extend(this.rpcParams,{'name':name,'signature':signature,}),}).then(function(data){if(data.error){self.$('.o_portal_sign_error_msg').remove();self.$controls.prepend(qweb.render('portal.portal_signature_error',{widget:data}));}else if(data.success){var $success=qweb.render('portal.portal_signature_success',{widget:data});self.$el.empty().append($success);} if(data.force_refresh){if(data.redirect_url){window.location=data.redirect_url;}else{window.location.reload();} return new Promise(function(){});}});},_onChangeSignature:function(){var isEmpty=this.nameAndSignature.isSignatureEmpty();this.$confirm_btn.prop('disabled',isEmpty);},});publicWidget.registry.SignatureForm=publicWidget.Widget.extend({selector:'.o_portal_signature_form',start:function(){var hasBeenReset=false;var callUrl=this.$el.data('call-url');var nameAndSignatureOptions={defaultName:this.$el.data('default-name'),mode:this.$el.data('mode'),displaySignatureRatio:this.$el.data('signature-ratio'),signatureType:this.$el.data('signature-type'),fontColor:this.$el.data('font-color')||'black',};var sendLabel=this.$el.data('send-label');var form=new SignatureForm(this,{callUrl:callUrl,nameAndSignatureOptions:nameAndSignatureOptions,sendLabel:sendLabel,});this.$el.closest('.modal').on('shown.bs.modal',function(ev){if(!hasBeenReset){hasBeenReset=true;form.resetSignature();}else{form.focusName();}});return Promise.all([this._super.apply(this,arguments),form.appendTo(this.$el)]);},});return{SignatureForm:SignatureForm,};});; /* /portal/static/src/js/portal_sidebar.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('portal.PortalSidebar',function(require){'use strict';var core=require('web.core');var publicWidget=require('web.public.widget');var time=require('web.time');var session=require('web.session');var _t=core._t;var PortalSidebar=publicWidget.Widget.extend({start:function(){this._setDelayLabel();return this._super.apply(this,arguments);},_setDelayLabel:function(){var $sidebarTimeago=this.$el.find('.o_portal_sidebar_timeago');_.each($sidebarTimeago,function(el){var dateTime=moment(time.auto_str_to_date($(el).attr('datetime'))),today=moment().startOf('day'),diff=dateTime.diff(today,'days',true),displayStr;session.is_bound.then(function(){if(diff===0){displayStr=_t('Due today');}else if(diff>0){displayStr=_.str.sprintf(_t('Due in %1d days'),Math.abs(diff));}else{displayStr=_.str.sprintf(_t('%1d days overdue'),Math.abs(diff));} $(el).text(displayStr);});});},_printIframeContent:function(href){if($.browser.mozilla){window.open(href,'_blank');return;} if(!this.printContent){this.printContent=$('');this.$el.append(this.printContent);this.printContent.on('load',function(){$(this).get(0).contentWindow.print();});}else{this.printContent.get(0).contentWindow.print();}},});return PortalSidebar;});; /* /account/static/src/js/account_portal_sidebar.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('account.AccountPortalSidebar',function(require){'use strict';const dom=require('web.dom');var publicWidget=require('web.public.widget');var PortalSidebar=require('portal.PortalSidebar');var utils=require('web.utils');publicWidget.registry.AccountPortalSidebar=PortalSidebar.extend({selector:'.o_portal_invoice_sidebar',events:{'click .o_portal_invoice_print':'_onPrintInvoice',},start:function(){var def=this._super.apply(this,arguments);var $invoiceHtml=this.$el.find('iframe#invoice_html');var updateIframeSize=this._updateIframeSize.bind(this,$invoiceHtml);$(window).on('resize',updateIframeSize);var iframeDoc=$invoiceHtml[0].contentDocument||$invoiceHtml[0].contentWindow.document;if(iframeDoc.readyState==='complete'){updateIframeSize();}else{$invoiceHtml.on('load',updateIframeSize);} return def;},_updateIframeSize:function($el){var $wrapwrap=$el.contents().find('div#wrapwrap');$el.height(0);$el.height($wrapwrap[0].scrollHeight);if(!utils.isValidAnchor(window.location.hash)){return;} var $target=$(window.location.hash);if(!$target.length){return;} dom.scrollTo($target[0],{duration:0});},_onPrintInvoice:function(ev){ev.preventDefault();var href=$(ev.currentTarget).attr('href');this._printIframeContent(href);},});});; /* /payment/static/lib/jquery.payment/jquery.payment.js defined in bundle 'web.assets_frontend_lazy' */ (function(){var $,cardFromNumber,cardFromType,cards,defaultFormat,formatBackCardNumber,formatBackExpiry,formatCardNumber,formatExpiry,formatForwardExpiry,formatForwardSlashAndSpace,hasTextSelected,luhnCheck,reFormatCVC,reFormatCardNumber,reFormatExpiry,reFormatNumeric,replaceFullWidthChars,restrictCVC,restrictCardNumber,restrictExpiry,restrictNumeric,safeVal,setCardType,__slice=[].slice,__indexOf=[].indexOf||function(item){for(var i=0,l=this.length;i9){digit-=9;} sum+=digit;} return sum%10===0;};hasTextSelected=function($target){var _ref;if(($target.prop('selectionStart')!=null)&&$target.prop('selectionStart')!==$target.prop('selectionEnd')){return true;} if((typeof document!=="undefined"&&document!==null?(_ref=document.selection)!=null?_ref.createRange:void 0:void 0)!=null){if(document.selection.createRange().text){return true;}} return false;};safeVal=function(value,$target){var currPair,cursor,digit,error,last,prevPair;try{cursor=$target.prop('selectionStart');}catch(_error){error=_error;cursor=null;} last=$target.val();$target.val(value);if(cursor!==null&&$target.is(":focus")){if(cursor===last.length){cursor=value.length;} if(last!==value){prevPair=last.slice(cursor-1,+cursor+1||9e9);currPair=value.slice(cursor-1,+cursor+1||9e9);digit=value[cursor];if(/\d/.test(digit)&&prevPair===(""+digit+" ")&&currPair===(" "+digit)){cursor=cursor+1;}} $target.prop('selectionStart',cursor);return $target.prop('selectionEnd',cursor);}};replaceFullWidthChars=function(str){var chars,chr,fullWidth,halfWidth,idx,value,_i,_len;if(str==null){str='';} fullWidth='\uff10\uff11\uff12\uff13\uff14\uff15\uff16\uff17\uff18\uff19';halfWidth='0123456789';value='';chars=str.split('');for(_i=0,_len=chars.length;_i<_len;_i++){chr=chars[_i];idx=fullWidth.indexOf(chr);if(idx>-1){chr=halfWidth[idx];} value+=chr;} return value;};reFormatNumeric=function(e){var $target;$target=$(e.currentTarget);return setTimeout(function(){var value;value=$target.val();value=replaceFullWidthChars(value);value=value.replace(/\D/g,'');return safeVal(value,$target);});};reFormatCardNumber=function(e){var $target;$target=$(e.currentTarget);return setTimeout(function(){var value;value=$target.val();value=replaceFullWidthChars(value);value=$.payment.formatCardNumber(value);return safeVal(value,$target);});};formatCardNumber=function(e){var $target,card,digit,length,re,upperLength,value;digit=String.fromCharCode(e.which);if(!/^\d+$/.test(digit)){return;} $target=$(e.currentTarget);value=$target.val();card=cardFromNumber(value+digit);length=(value.replace(/\D/g,'')+digit).length;upperLength=16;if(card){upperLength=card.length[card.length.length-1];} if(length>=upperLength){return;} if(($target.prop('selectionStart')!=null)&&$target.prop('selectionStart')!==value.length){return;} if(card&&card.type==='amex'){re=/^(\d{4}|\d{4}\s\d{6})$/;}else{re=/(?:^|\s)(\d{4})$/;} if(re.test(value)){e.preventDefault();return setTimeout(function(){return $target.val(value+' '+digit);});}else if(re.test(value+digit)){e.preventDefault();return setTimeout(function(){return $target.val(value+digit+' ');});}};formatBackCardNumber=function(e){var $target,value;$target=$(e.currentTarget);value=$target.val();if(e.which!==8){return;} if(($target.prop('selectionStart')!=null)&&$target.prop('selectionStart')!==value.length){return;} if(/\d\s$/.test(value)){e.preventDefault();return setTimeout(function(){return $target.val(value.replace(/\d\s$/,''));});}else if(/\s\d?$/.test(value)){e.preventDefault();return setTimeout(function(){return $target.val(value.replace(/\d$/,''));});}};reFormatExpiry=function(e){var $target;$target=$(e.currentTarget);return setTimeout(function(){var value;value=$target.val();value=replaceFullWidthChars(value);value=$.payment.formatExpiry(value);return safeVal(value,$target);});};formatExpiry=function(e){var $target,digit,val;digit=String.fromCharCode(e.which);if(!/^\d+$/.test(digit)){return;} $target=$(e.currentTarget);val=$target.val()+digit;if(/^\d$/.test(val)&&(val!=='0'&&val!=='1')){e.preventDefault();return setTimeout(function(){return $target.val("0"+val+" / ");});}else if(/^\d\d$/.test(val)){e.preventDefault();return setTimeout(function(){var m1,m2;m1=parseInt(val[0],10);m2=parseInt(val[1],10);if(m2>2&&m1!==0){return $target.val("0"+m1+" / "+m2);}else{return $target.val(""+val+" / ");}});}};formatForwardExpiry=function(e){var $target,digit,val;digit=String.fromCharCode(e.which);if(!/^\d+$/.test(digit)){return;} $target=$(e.currentTarget);val=$target.val();if(/^\d\d$/.test(val)){return $target.val(""+val+" / ");}};formatForwardSlashAndSpace=function(e){var $target,val,which;which=String.fromCharCode(e.which);if(!(which==='/'||which===' ')){return;} $target=$(e.currentTarget);val=$target.val();if(/^\d$/.test(val)&&val!=='0'){return $target.val("0"+val+" / ");}};formatBackExpiry=function(e){var $target,value;$target=$(e.currentTarget);value=$target.val();if(e.which!==8){return;} if(($target.prop('selectionStart')!=null)&&$target.prop('selectionStart')!==value.length){return;} if(/\d\s\/\s$/.test(value)){e.preventDefault();return setTimeout(function(){return $target.val(value.replace(/\d\s\/\s$/,''));});}};reFormatCVC=function(e){var $target;$target=$(e.currentTarget);return setTimeout(function(){var value;value=$target.val();value=replaceFullWidthChars(value);value=value.replace(/\D/g,'').slice(0,4);return safeVal(value,$target);});};restrictNumeric=function(e){var input;if(e.metaKey||e.ctrlKey){return true;} if(e.which===32){return false;} if(e.which===0){return true;} if(e.which<33){return true;} input=String.fromCharCode(e.which);return!!/[\d\s]/.test(input);};restrictCardNumber=function(e){var $target,card,digit,value;$target=$(e.currentTarget);digit=String.fromCharCode(e.which);if(!/^\d+$/.test(digit)){return;} if(hasTextSelected($target)){return;} value=($target.val()+digit).replace(/\D/g,'');card=cardFromNumber(value);if(card){return value.length<=card.length[card.length.length-1];}else{return value.length<=16;}};restrictExpiry=function(e){var $target,digit,value;$target=$(e.currentTarget);digit=String.fromCharCode(e.which);if(!/^\d+$/.test(digit)){return;} if(hasTextSelected($target)){return;} value=$target.val()+digit;value=value.replace(/\D/g,'');if(value.length>6){return false;}};restrictCVC=function(e){var $target,digit,val;$target=$(e.currentTarget);digit=String.fromCharCode(e.which);if(!/^\d+$/.test(digit)){return;} if(hasTextSelected($target)){return;} val=$target.val()+digit;return val.length<=4;};setCardType=function(e){var $target,allTypes,card,cardType,val;$target=$(e.currentTarget);val=$target.val();cardType=$.payment.cardType(val)||'unknown';if(!$target.hasClass(cardType)){allTypes=(function(){var _i,_len,_results;_results=[];for(_i=0,_len=cards.length;_i<_len;_i++){card=cards[_i];_results.push(card.type);} return _results;})();$target.removeClass('unknown');$target.removeClass(allTypes.join(' '));$target.addClass(cardType);$target.toggleClass('identified',cardType!=='unknown');return $target.trigger('payment.cardType',cardType);}};$.payment.fn.formatCardCVC=function(){this.on('keypress',restrictNumeric);this.on('keypress',restrictCVC);this.on('paste',reFormatCVC);this.on('change',reFormatCVC);this.on('input',reFormatCVC);return this;};$.payment.fn.formatCardExpiry=function(){this.on('keypress',restrictNumeric);this.on('keypress',restrictExpiry);this.on('keypress',formatExpiry);this.on('keypress',formatForwardSlashAndSpace);this.on('keypress',formatForwardExpiry);this.on('keydown',formatBackExpiry);this.on('change',reFormatExpiry);this.on('input',reFormatExpiry);return this;};$.payment.fn.formatCardNumber=function(){this.on('keypress',restrictNumeric);this.on('keypress',restrictCardNumber);this.on('keypress',formatCardNumber);this.on('keydown',formatBackCardNumber);this.on('keyup',setCardType);this.on('paste',reFormatCardNumber);this.on('change',reFormatCardNumber);this.on('input',reFormatCardNumber);this.on('input',setCardType);return this;};$.payment.fn.restrictNumeric=function(){this.on('keypress',restrictNumeric);this.on('paste',reFormatNumeric);this.on('change',reFormatNumeric);this.on('input',reFormatNumeric);return this;};$.payment.fn.cardExpiryVal=function(){return $.payment.cardExpiryVal($(this).val());};$.payment.cardExpiryVal=function(value){var month,prefix,year,_ref;_ref=value.split(/[\s\/]+/,2),month=_ref[0],year=_ref[1];if((year!=null?year.length:void 0)===2&&/^\d+$/.test(year)){prefix=(new Date).getFullYear();prefix=prefix.toString().slice(0,2);year=prefix+year;} month=parseInt(month,10);year=parseInt(year,10);return{month:month,year:year};};$.payment.validateCardNumber=function(num){var card,_ref;num=(num+'').replace(/\s+|-/g,'');if(!/^\d+$/.test(num)){return false;} card=cardFromNumber(num);if(!card){return false;} return(_ref=num.length,__indexOf.call(card.length,_ref)>=0)&&(card.luhn===false||luhnCheck(num));};$.payment.validateCardExpiry=function(month,year){var currentTime,expiry,_ref;if(typeof month==='object'&&'month'in month){_ref=month,month=_ref.month,year=_ref.year;} if(!(month&&year)){return false;} month=$.trim(month);year=$.trim(year);if(!/^\d+$/.test(month)){return false;} if(!/^\d+$/.test(year)){return false;} if(!((1<=month&&month<=12))){return false;} if(year.length===2){if(year<70){year="20"+year;}else{year="19"+year;}} if(year.length!==4){return false;} expiry=new Date(year,month);currentTime=new Date;expiry.setMonth(expiry.getMonth()-1);expiry.setMonth(expiry.getMonth()+1,1);return expiry>currentTime;};$.payment.validateCardCVC=function(cvc,type){var card,_ref;cvc=$.trim(cvc);if(!/^\d+$/.test(cvc)){return false;} card=cardFromType(type);if(card!=null){return _ref=cvc.length,__indexOf.call(card.cvcLength,_ref)>=0;}else{return cvc.length>=3&&cvc.length<=4;}};$.payment.cardType=function(num){var _ref;if(!num){return null;} return((_ref=cardFromNumber(num))!=null?_ref.type:void 0)||null;};$.payment.formatCardNumber=function(num){var card,groups,upperLength,_ref;num=num.replace(/\D/g,'');card=cardFromNumber(num);if(!card){return num;} upperLength=card.length[card.length.length-1];num=num.slice(0,upperLength);if(card.format.global){return(_ref=num.match(card.format))!=null?_ref.join(' '):void 0;}else{groups=card.format.exec(num);if(groups==null){return;} groups.shift();groups=$.grep(groups,function(n){return n;});return groups.join(' ');}};$.payment.formatExpiry=function(expiry){var mon,parts,sep,year;parts=expiry.match(/^\D*(\d{1,2})(\D+)?(\d{1,4})?/);if(!parts){return'';} mon=parts[1]||'';sep=parts[2]||'';year=parts[3]||'';if(year.length>0){sep=' / ';}else if(sep===' /'){mon=mon.substring(0,1);sep='';}else if(mon.length===2||sep.length>0){sep=' / ';}else if(mon.length===1&&(mon!=='0'&&mon!=='1')){mon="0"+mon;sep=' / ';} return mon+sep+year;};}).call(this);; /* /payment/static/src/js/checkout_form.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('payment.checkout_form',require=>{'use strict';const publicWidget=require('web.public.widget');const paymentFormMixin=require('payment.payment_form_mixin');publicWidget.registry.PaymentCheckoutForm=publicWidget.Widget.extend(paymentFormMixin,{selector:'form[name="o_payment_checkout"]',events:Object.assign({},publicWidget.Widget.prototype.events,{'click div[name="o_payment_option_card"]':'_onClickPaymentOption','click a[name="o_payment_icon_more"]':'_onClickMorePaymentIcons','click a[name="o_payment_icon_less"]':'_onClickLessPaymentIcons','click button[name="o_payment_submit_button"]':'_onClickPay','submit':'_onSubmit',}),init:function(){const preventDoubleClick=handlerMethod=>{return _.debounce(handlerMethod,500,true);};this._super(...arguments);this._onClickLessPaymentIcons=preventDoubleClick(this._onClickLessPaymentIcons);this._onClickMorePaymentIcons=preventDoubleClick(this._onClickMorePaymentIcons);this._onClickPay=preventDoubleClick(this._onClickPay);this._onClickPaymentOption=preventDoubleClick(this._onClickPaymentOption);this._onSubmit=preventDoubleClick(this._onSubmit);},_onClickPay:async function(ev){ev.stopPropagation();ev.preventDefault();const $checkedRadios=this.$('input[name="o_payment_radio"]:checked');if(!this._ensureRadioIsChecked($checkedRadios)){return;} const checkedRadio=$checkedRadios[0];const provider=this._getProviderFromRadio(checkedRadio);const paymentOptionId=this._getPaymentOptionIdFromRadio(checkedRadio);const flow=this._getPaymentFlowFromRadio(checkedRadio);if(flow!=='token'){const $tokenizeCheckbox=this.$(`#o_payment_acquirer_inline_form_${paymentOptionId}`).find('input[name="o_payment_save_as_token"]');this.txContext.tokenizationRequested=$tokenizeCheckbox.length===1&&$tokenizeCheckbox[0].checked;}else{this.txContext.tokenizationRequested=false;} this._hideError();this._disableButton(true);$('body').block({message:false,overlayCSS:{backgroundColor:"#000",opacity:0,zIndex:1050},});this._processPayment(provider,paymentOptionId,flow);},_onSubmit:function(ev){ev.stopPropagation();ev.preventDefault();this._onClickPay(ev);},});return publicWidget.registry.PaymentCheckoutForm;});; /* /payment/static/src/js/manage_form.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('payment.manage_form',require=>{'use strict';const core=require('web.core');const publicWidget=require('web.public.widget');const Dialog=require('web.Dialog');const paymentFormMixin=require('payment.payment_form_mixin');const _t=core._t;publicWidget.registry.PaymentManageForm=publicWidget.Widget.extend(paymentFormMixin,{selector:'form[name="o_payment_manage"]',events:Object.assign({},publicWidget.Widget.prototype.events,{'click div[name="o_payment_option_card"]':'_onClickPaymentOption','click a[name="o_payment_icon_more"]':'_onClickMorePaymentIcons','click a[name="o_payment_icon_less"]':'_onClickLessPaymentIcons','click button[name="o_payment_submit_button"]':'_onClickSaveToken','click button[name="o_payment_delete_token"]':'_onClickDeleteToken','submit':'_onSubmit',}),init:function(){const preventDoubleClick=handlerMethod=>{return _.debounce(handlerMethod,500,true);};this._super(...arguments);this._onClickDeleteToken=preventDoubleClick(this._onClickDeleteToken);this._onClickLessPaymentIcons=preventDoubleClick(this._onClickLessPaymentIcons);this._onClickMorePaymentIcons=preventDoubleClick(this._onClickMorePaymentIcons);this._onClickPaymentOption=preventDoubleClick(this._onClickPaymentOption);this._onClickSaveToken=preventDoubleClick(this._onClickSaveToken);this._onSubmit=preventDoubleClick(this._onSubmit);},_assignToken:function(tokenId){this._rpc({route:this.txContext.assignTokenRoute,params:{'token_id':tokenId,'csrf_token':core.csrf_token,}}).then(()=>{window.location=this.txContext.landingRoute;}).guardedCatch(error=>{error.event.preventDefault();this._displayError(_t("Server Error"),_t("We are not able to save your payment method."),error.message.data.message);});},_deleteToken:function(tokenId){const execute=()=>{this._rpc({route:'/payment/archive_token',params:{'token_id':tokenId,},}).then(()=>{const $tokenCard=this.$(`input[name="o_payment_radio"][data-payment-option-id="${tokenId}"]`+`[data-payment-option-type="token"]`).closest('div[name="o_payment_option_card"]');$tokenCard.siblings(`#o_payment_token_inline_form_${tokenId}`).remove();$tokenCard.remove();this._disableButton(false);}).guardedCatch(error=>{error.event.preventDefault();this._displayError(_t("Server Error"),_t("We are not able to delete your payment method."),error.message.data.message);});};this._rpc({model:'payment.token',method:'get_linked_records_info',args:[tokenId],}).then(result=>{const $dialogContentMessage=$('',{text:_t("Are you sure you want to delete this payment method?")});if(result.length>0){$dialogContentMessage.append($('
'));$dialogContentMessage.append($('',{text:_t("It is currently linked to the following documents:")}));const $documentInfoList=$('
    ');result.forEach(documentInfo=>{$documentInfoList.append($('
  • ').append($('',{href:documentInfo.url,target:'_blank',title:documentInfo.description,text:documentInfo.name})));});$dialogContentMessage.append($documentInfoList);} new Dialog(this,{title:_t("Warning!"),size:'medium',$content:$('
    ').append($dialogContentMessage),buttons:[{text:_t("Confirm Deletion"),classes:'btn-primary',close:true,click:execute},{text:_t("Cancel"),close:true},],}).open();}).guardedCatch(error=>{this._displayError(_t("Server Error"),_t("We are not able to delete your payment method."),error.message.data.message);});},_onClickDeleteToken:function(ev){ev.preventDefault();const linkedRadio=$(ev.currentTarget).siblings().find('input[name="o_payment_radio"]')[0];const tokenId=this._getPaymentOptionIdFromRadio(linkedRadio);this._deleteToken(tokenId);},_onClickSaveToken:async function(ev){ev.stopPropagation();ev.preventDefault();const $checkedRadios=this.$('input[name="o_payment_radio"]:checked');if(!this._ensureRadioIsChecked($checkedRadios)){return;} const checkedRadio=$checkedRadios[0];const provider=this._getProviderFromRadio(checkedRadio);const paymentOptionId=this._getPaymentOptionIdFromRadio(checkedRadio);const flow=this._getPaymentFlowFromRadio(checkedRadio);this._hideError();this._disableButton(true);$('body').block({message:false,overlayCSS:{backgroundColor:"#000",opacity:0,zIndex:1050},});if(flow!=='token'){this.txContext.tokenizationRequested=true;this.txContext.isValidation=true;this._processPayment(provider,paymentOptionId,flow);}else if(this.txContext.allowTokenSelection){this._assignToken(paymentOptionId);}},_onSubmit:function(ev){ev.stopPropagation();ev.preventDefault();this._onClickSaveToken(ev);},});return publicWidget.registry.PaymentManageForm;});; /* /payment/static/src/js/payment_form_mixin.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('payment.payment_form_mixin',require=>{'use strict';const core=require('web.core');const Dialog=require('web.Dialog');const _t=core._t;return{start:async function(){await this._super(...arguments);window.addEventListener('pageshow',function(event){if(event.persisted){window.location.reload();}});this.$('[data-toggle="tooltip"]').tooltip();this.txContext={};Object.assign(this.txContext,this.$el.data());const $checkedRadios=this.$('input[name="o_payment_radio"]:checked');if($checkedRadios.length===1){const checkedRadio=$checkedRadios[0];this._displayInlineForm(checkedRadio);this._enableButton();}else{this._setPaymentFlow();}},_disableButton:(showLoadingAnimation=true)=>{const $submitButton=this.$('button[name="o_payment_submit_button"]');const iconClass=$submitButton.data('icon-class');$submitButton.attr('disabled',true);if(showLoadingAnimation){$submitButton.find('i').removeClass(iconClass);$submitButton.prepend(' ');}},_displayError:function(title,description='',error=''){const $checkedRadios=this.$('input[name="o_payment_radio"]:checked');if($checkedRadios.length!==1){return new Dialog(null,{title:_.str.sprintf(_t("Error: %s"),title),size:'medium',$content:`

    ${_.str.escapeHTML(description) || ''}

    `,buttons:[{text:_t("Ok"),close:true}]}).open();}else{this._hideError();let errorHtml=`
    ${_.str.escapeHTML(title)}`;if(description!==''){errorHtml+=`
    ${_.str.escapeHTML(description)}`;} if(error!==''){errorHtml+=`
    ${_.str.escapeHTML(error)}`;} errorHtml+='
    ';const checkedRadio=$checkedRadios[0];const paymentOptionId=this._getPaymentOptionIdFromRadio(checkedRadio);const formType=$(checkedRadio).data('payment-option-type');const $inlineForm=this.$(`#o_payment_${formType}_inline_form_${paymentOptionId}`);$inlineForm.removeClass('d-none');$inlineForm.append(errorHtml).find('div[name="o_payment_error"]')[0].scrollIntoView({behavior:'smooth',block:'center'});} this._enableButton();$('body').unblock();},_displayInlineForm:function(radio){this._hideInlineForms();this._hideError();this._setPaymentFlow();const provider=this._getProviderFromRadio(radio);const paymentOptionId=this._getPaymentOptionIdFromRadio(radio);const flow=this._getPaymentFlowFromRadio(radio);this._prepareInlineForm(provider,paymentOptionId,flow);const formType=$(radio).data('payment-option-type');const $inlineForm=this.$(`#o_payment_${formType}_inline_form_${paymentOptionId}`);if($inlineForm.children().length>0){$inlineForm.removeClass('d-none');}},_enableButton:function(){if(this._isButtonReady()){const $submitButton=this.$('button[name="o_payment_submit_button"]');const iconClass=$submitButton.data('icon-class');$submitButton.attr('disabled',false);$submitButton.find('i').addClass(iconClass);$submitButton.find('span.o_loader').remove();return true;} return false;},_ensureRadioIsChecked:function($checkedRadios){if($checkedRadios.length===0){this._displayError(_t("No payment option selected"),_t("Please select a payment option."));return false;}else if($checkedRadios.length>1){this._displayError(_t("Multiple payment options selected"),_t("Please select only one payment option."));return false;} return true;},_getPaymentFlowFromRadio:function(radio){if($(radio).data('payment-option-type')==='token'||this.txContext.flow==='token'){return'token';}else if(this.txContext.flow==='redirect'){return'redirect';}else{return'direct';}},_getPaymentOptionIdFromRadio:radio=>$(radio).data('payment-option-id'),_getProviderFromRadio:radio=>$(radio).data('provider'),_hideError:()=>this.$('div[name="o_payment_error"]').remove(),_hideInlineForms:()=>this.$('[name="o_payment_inline_form"]').addClass('d-none'),_hideInputs:function(){const $submitButton=this.$('button[name="o_payment_submit_button"]');const $tokenizeCheckboxes=this.$('input[name="o_payment_save_as_token"]');$submitButton.addClass('d-none');$tokenizeCheckboxes.closest('label').addClass('d-none');},_isButtonReady:function(){const $checkedRadios=this.$('input[name="o_payment_radio"]:checked');if($checkedRadios.length===1){const checkedRadio=$checkedRadios[0];const flow=this._getPaymentFlowFromRadio(checkedRadio);return flow!=='token'||this.txContext.allowTokenSelection;}else{return false;}},_prepareTransactionRouteParams:function(provider,paymentOptionId,flow){return{'payment_option_id':paymentOptionId,'reference_prefix':this.txContext.referencePrefix!==undefined?this.txContext.referencePrefix.toString():null,'amount':this.txContext.amount!==undefined?parseFloat(this.txContext.amount):null,'currency_id':this.txContext.currencyId?parseInt(this.txContext.currencyId):null,'partner_id':parseInt(this.txContext.partnerId),'invoice_id':this.txContext.invoiceId?parseInt(this.txContext.invoiceId):null,'flow':flow,'tokenization_requested':this.txContext.tokenizationRequested,'landing_route':this.txContext.landingRoute,'is_validation':this.txContext.isValidation,'access_token':this.txContext.accessToken?this.txContext.accessToken:undefined,'csrf_token':core.csrf_token,};},_prepareInlineForm:(provider,paymentOptionId,flow)=>Promise.resolve(),_processPayment:function(provider,paymentOptionId,flow){return this._rpc({route:this.txContext.transactionRoute,params:this._prepareTransactionRouteParams(provider,paymentOptionId,flow),}).then(processingValues=>{if(flow==='redirect'){return this._processRedirectPayment(provider,paymentOptionId,processingValues);}else if(flow==='direct'){return this._processDirectPayment(provider,paymentOptionId,processingValues);}else if(flow==='token'){return this._processTokenPayment(provider,paymentOptionId,processingValues);}}).guardedCatch(error=>{error.event.preventDefault();this._displayError(_t("Server Error"),_t("We are not able to process your payment."),error.message.data.message);});},_processDirectPayment:(provider,acquirerId,processingValues)=>Promise.resolve(),_processRedirectPayment:(provider,acquirerId,processingValues)=>{const $redirectForm=$(processingValues.redirect_form_html).attr('id','o_payment_redirect_form');$(document.getElementsByTagName('body')[0]).append($redirectForm);$redirectForm.submit();},_processTokenPayment:(provider,tokenId,processingValues)=>{window.location='/payment/status';},_setPaymentFlow:function(flow='redirect'){if(flow!=='redirect'&&flow!=='direct'&&flow!=='token'){console.warn(`payment_form_mixin: method '_setPaymentFlow' was called with invalid flow: ${flow}. Falling back to 'redirect'.`);this.txContext.flow='redirect';}else{this.txContext.flow=flow;}},_showInputs:function(){const $submitButton=this.$('button[name="o_payment_submit_button"]');const $tokenizeCheckboxes=this.$('input[name="o_payment_save_as_token"]');$submitButton.removeClass('d-none');$tokenizeCheckboxes.closest('label').removeClass('d-none');},_onClickLessPaymentIcons:ev=>{ev.preventDefault();ev.stopPropagation();const $itemList=$(ev.currentTarget).parents('ul');const maxIconNumber=$itemList.data('max-icons');$itemList.children('li').slice(maxIconNumber).addClass('d-none');$itemList.find('a[name="o_payment_icon_more"]').parents('li').removeClass('d-none');},_onClickMorePaymentIcons:ev=>{ev.preventDefault();ev.stopPropagation();$(ev.currentTarget).parents('ul').children('li').removeClass('d-none');$(ev.currentTarget).parents('li').addClass('d-none');},_onClickPaymentOption:function(ev){this.$('input[name="o_payment_radio"]').prop('checked',false);const checkedRadio=$(ev.currentTarget).find('input[name="o_payment_radio"]')[0];$(checkedRadio).prop('checked',true);this._showInputs();this._disableButton(false);this._displayInlineForm(checkedRadio);this._enableButton();},};});; /* /payment/static/src/js/post_processing.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('payment.post_processing',function(require){'use strict';var publicWidget=require('web.public.widget');var core=require('web.core');const{Markup}=require('web.utils');var _t=core._t;$.blockUI.defaults.css.border='0';$.blockUI.defaults.css["background-color"]='';$.blockUI.defaults.overlayCSS["opacity"]='0.9';publicWidget.registry.PaymentPostProcessing=publicWidget.Widget.extend({selector:'div[name="o_payment_status"]',xmlDependencies:['/payment/static/src/xml/payment_post_processing.xml'],_pollCount:0,start:function(){this.displayLoading();this.poll();return this._super.apply(this,arguments);},startPolling:function(){var timeout=3000;if(this._pollCount>=10&&this._pollCount<20){timeout=10000;} else if(this._pollCount>=20){timeout=30000;} setTimeout(this.poll.bind(this),timeout);this._pollCount++;},poll:function(){var self=this;this._rpc({route:'/payment/status/poll',params:{'csrf_token':core.csrf_token,}}).then(function(data){if(data.success===true){self.processPolledData(data.display_values_list);} else{switch(data.error){case"tx_process_retry":break;case"no_tx_found":self.displayContent("payment.no_tx_found",{});break;default:self.displayContent("payment.exception",{exception_msg:data.error});break;}} self.startPolling();}).guardedCatch(function(){self.displayContent("payment.rpc_error",{});self.startPolling();});},processPolledData:function(display_values_list){var render_values={'tx_draft':[],'tx_pending':[],'tx_authorized':[],'tx_done':[],'tx_cancel':[],'tx_error':[],};if(display_values_list.length>0){window.location=display_values_list[0].landing_route;return;} display_values_list.forEach(function(display_values){var key='tx_'+display_values.state;if(key in render_values){if(display_values["display_message"]){display_values.display_message=Markup(display_values.display_message)} render_values[key].push(display_values);}});function countTxInState(states){var nbTx=0;for(var prop in render_values){if(states.indexOf(prop)>-1&&render_values.hasOwnProperty(prop)){nbTx+=render_values[prop].length;}} return nbTx;} if(countTxInState(['tx_done','tx_error','tx_pending','tx_authorized'])===1){var tx=render_values['tx_done'][0]||render_values['tx_authorized'][0]||render_values['tx_error'][0];if(tx){window.location=tx.landing_route;return;}} this.displayContent("payment.display_tx_list",render_values);},displayContent:function(xmlid,render_values){var html=core.qweb.render(xmlid,render_values);$.unblockUI();this.$el.find('div[name="o_payment_status_content"]').html(html);},displayLoading:function(){var msg=_t("We are processing your payment, please wait ...");$.blockUI({'message':'

    '+'
    '+msg+'

    '});},});});; /* /sale/static/src/js/sale_portal_sidebar.js defined in bundle 'web.assets_frontend_lazy' */ odoo.define('sale.SalePortalSidebar',function(require){'use strict';var publicWidget=require('web.public.widget');var PortalSidebar=require('portal.PortalSidebar');publicWidget.registry.SalePortalSidebar=PortalSidebar.extend({selector:'.o_portal_sale_sidebar',init:function(parent,options){this._super.apply(this,arguments);this.authorizedTextTag=['em','b','i','u'];this.spyWatched=$('body[data-target=".navspy"]');},start:function(){var def=this._super.apply(this,arguments);var $spyWatcheElement=this.$el.find('[data-id="portal_sidebar"]');this._setElementId($spyWatcheElement);this._generateMenu();if($.bbq.getState('allow_payment')==='yes'&&this.$('#o_sale_portal_paynow').length){this.$('#o_sale_portal_paynow').trigger('click');$.bbq.removeState('allow_payment');} return def;},_setElementId:function(prefix,$el){var id=_.uniqueId(prefix);this.spyWatched.find($el).attr('id',id);return id;},_generateMenu:function(){var self=this,lastLI=false,lastUL=null,$bsSidenav=this.$el.find('.bs-sidenav');$("#quote_content [id^=quote_header_], #quote_content [id^=quote_]",this.spyWatched).attr("id","");_.each(this.spyWatched.find("#quote_content h2, #quote_content h3"),function(el){var id,text;switch(el.tagName.toLowerCase()){case"h2":id=self._setElementId('quote_header_',el);text=self._extractText($(el));if(!text){break;} lastLI=$("